From 11f5bb3f58a4bbd744e591dfc6895367b3fe5f95 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@2501 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index f1672ec56..fa181e674 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); + } } }