为foreach()错误提供的无效参数


Invalid argument supplied for foreach() error

我得到这个错误后,刚刚安装了一个儿童主题的主题。子主题是水晶。

错误是:

警告:第3行crystal/footer.php中为foreach()提供的参数无效

footer.php中,我有这个:

<?php
global $options;
foreach ($options as $value) {
  if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; }
  else { $$value['id'] = get_settings( $value['id'] ); }
 }
?>
</div><!-- #main -->
<?php thematic_abovefooter(); ?>    
<div id="footer">
    <?php get_sidebar('subsidiary'); ?>
    <div id="siteinfo">        
        <?php /* footer text set in theme options */ echo   
     stripslashes($thm_footertext); ?>
        <br/><a href="http://www.reflectionmedia.ro/blog/">Crystalline  
     Child Theme</a>
    </div><!-- #siteinfo -->
</div><!-- #footer -->
 </div><!-- #wrapper .hfeed -->
 <?php wp_footer() ?>
 </body>
 </html>
$options

可能不是数组或对象。

检查:

var_dump($options);