after upgrading from debian sarge to etch, which included an upgrade to php 4.4.4-8 I started getting lots of foreach errors like this one:
Warning: Invalid argument supplied for foreach() in /var/www/web23/web/wp-content/plugins/redirection/redirection.php on line 297
any ideas or hints?
One usually gets that when foreach() is being passed something that's not an array (or empty).
Take a look at line 297 and surround the foreach() in a conditional - for example:
if(is_array($array)) {
foreach($array as $whatever) { ... }
}
is_array() should work, but I haven't checked... you could also use:
if(count($array) > 0) {
foreach($array as $whatever) { ... }
}