From 41ab29d8ecbcdeb1280b1c1201d4f0a27390d130 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 31 Mar 2005 04:04:14 +0000 Subject: [PATCH] Add a precautionary is_array() check around the plugin loading loop. http://mosquito.wordpress.org/view.php?id=1015 git-svn-id: https://develop.svn.wordpress.org/trunk@2501 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-settings.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index f1672ec567..fa181e6748 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -110,9 +110,11 @@ if (get_settings('hack_file')) { if ( get_settings('active_plugins') ) { $current_plugins = get_settings('active_plugins'); - foreach ($current_plugins as $plugin) { - if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin)) - include_once(ABSPATH . 'wp-content/plugins/' . $plugin); + if ( is_array($current_plugins) ) { + foreach ($current_plugins as $plugin) { + if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin)) + include_once(ABSPATH . 'wp-content/plugins/' . $plugin); + } } }