i3theme-1-8 php error: Warning: Invalid argument supplied for foreach()
-
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.bak2. 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,2009Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/wordpress/wp-content/themes/i3theme-1-8-classic-fluid/functions.php on line 77
The topic ‘i3theme-1-8 php error: Warning: Invalid argument supplied for foreach()’ is closed to new replies.