Invalid argument supplied for foreach()…..
-
hello,
i just updated my website to wordpress 3.9, and i keep getting a lot of these messages on top of each page :
Warning: Invalid argument supplied for foreach() in /flex/domain/pila.fr/site/www/wordpress/wp-includes/plugin.php on line 622With all plugin deactivated (I renamed the plugins folder to be sure) i just get the message 4 times, but each plugin I reactivate increase the number of time this message is displayed.
The same problems seems to prevent the display of the RSS feed page : just go to https://pila.fr/wordpress/?feed=rss2 to see what it looks like.
I just looked inside the plugin.php file, and this seems to be the section causing troubles :
function plugin_basename( $file ) { global $wp_plugin_paths; foreach ( $wp_plugin_paths as $dir => $realdir ) { if ( strpos( $file, $realdir ) === 0 ) { $file = $dir . substr( $file, strlen( $realdir ) ); } } $file = wp_normalize_path( $file ); $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR ); $mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR ); $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir $file = trim($file, '/'); return $file; }
I don’t really know PHP, so i just can’t explain myself what is going wrong. Could you help me ?
- The topic ‘Invalid argument supplied for foreach()…..’ is closed to new replies.