Support » Themes and Templates » Warning: Invalid argument supplied for foreach()

  • Warning: Invalid argument supplied for foreach() in /data/web/virtuals/14388/virtual/www/wp-content/themes/chester/page.php on line 20

    Can you help me out how to fix it, pls?
    —————————————————————
    else{
    foreach(get_field(‘rpt-‘.$chester_page) as $chester_key){
    $chester_pages[] = array(
    ‘custom’ => $chester_page,
    ‘rpt’ => $chester_key,
    ‘weight’ => $chester_key[‘weight_’.$chester_page]
    );
    }
    }
    ————————————————————–
    Line 20 is foreach(get_field(‘rpt-‘.$chester_page) as $chester_key){

    Thanks in advance

  • The topic ‘Warning: Invalid argument supplied for foreach()’ is closed to new replies.