• Resolved kayinmay

    (@kayinmay)


    php error on new empty pages (problem with i3-themes)
    ——————————————————
    creating new empty pages in wordpress (i3-themes activated) causes a php-error: Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/wordpress/wp-content/themes/i3theme-1-8-classic-fluid/functions.php on line 77″, when no initial comments supplied!

    I wrote a bug fix (check if array is empty –> do nothing) and supplied re-author (mangoorange) with this patch.

    fix:
    —-
    1. backup i3theme-1-8-classic-fluid/functions.php to i3theme-1-8-classic-fluid/functions.php.bak

    2. open i3theme-1-8-classic-fluid/functions.php in text editor,
    go to line 77 (foreach ($comments AS $comment)

    3. replace with:
    if ($comments != 0) {
    foreach ($comments as $comment);
    } else {
    }

    hope it works (still small cosmetic error on empty pages (comment-date), but no errors anymore

    kayinmay
    june,06,2009

    Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/wordpress/wp-content/themes/i3theme-1-8-classic-fluid/functions.php on line 77

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    It is due to not proper designing the theme code. Change your theme to default and have a check with creating pages and posts.

    Thanks,

    Shane G.

    Warning: file(/home/public_html/techwor.com/wp-content/themes/i3theme-1-8-classic/style.css) [function.file]: failed to open stream: No such file or directory in /home//public_html/wp-includes/theme.php on line 180

    Warning: implode() [function.implode]: Invalid arguments passed in /home/public_html/wp-includes/theme.php on line 180

    I got this error for i3theme-1-8-classic.

    Wonder and appreciate if you can help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘i3theme-1-8 php error: Warning: Invalid argument supplied for foreach()’ is closed to new replies.