PHP7.1致命错误:[]不支持字符串的操作员



我构建了一些功能主题选项WordPress。

但是我现在正在收到以下错误,我在做什么错?

  if(isset($thm_options['custom_font1_eot']))
    $w_custom_font1_src[] = "url('{$thm_options['custom_font1_eot']['url']}?#iefix') format('embedded-opentype')";
  if(isset($thm_options['custom_font1_woff']))   
    $w_custom_font1_src[] = "url('{$thm_options['custom_font1_woff']['url']}') format('woff')";
  if(isset($thm_options['custom_font1_ttf']))
    $w_custom_font1_src[] = "url('{$thm_options['custom_font1_ttf']['url']}') format('truetype')";

致命错误:[]

中的字符串不支持操作员

我错过的代码?

您可能已经将此变量$w_custom_font1_src用作程序中其他地方的string

因此,现在重新定性为array

 $w_custom_font1_src =  array();

最新更新