PHP警告:为foreach() - gantry插件提供的参数无效

时间:2013-09-16 07:56:38

标签: php wordpress foreach

几天前我收到了这个错误日志

PHP Warning:  Invalid argument supplied for foreach() in /home/karatm/public_html/wp-content/plugins/gantry/bugfixes.php on line 52<br>
PHP Warning:  Invalid argument supplied for foreach() in /home/karatm/public_html/wp-content/plugins/gantry/bugfixes.php on line 52<br>
PHP Warning:  Invalid argument supplied for foreach() in /home/karatm/public_html/wp-content/plugins/gantry/bugfixes.php on line 102<br>

这是来自bugfixes.php的第52行:

foreach($sidebar_contents as $sidebar_contents_id => &$sidebar_widget_instance)

这是来自bugfixes.php的第102行:

foreach ($override_sidebar as $position => &$sbw_instances)

这个错误意味着什么,我该如何解决?

(如果有人可以帮助我,我可以给他发送完整的.php文件)

由于

1 个答案:

答案 0 :(得分:0)

foreach($ override_sidebar为$ position =&gt;&amp; $ sbw_instances) 试着删除&amp; 试试这个 foreach($ override_sidebar as $ position =&gt; $ sbw_instances)