From 8bf7f4c443dda28ec09362eb4c5752645ca21b54 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 5 Oct 2005 23:19:48 +0000 Subject: [PATCH] Actually remove deleted plugins from the active plugin list. This has been broken for ever. fixes #1709 git-svn-id: http://svn.automattic.com/wordpress/trunk@2932 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/plugins.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index da5c9645c..1e414b4a9 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -43,8 +43,11 @@ if ( !is_array($check_plugins) ) { foreach ($check_plugins as $check_plugin) { if (!file_exists(ABSPATH . 'wp-content/plugins/' . $check_plugin)) { $current = get_settings('active_plugins'); - unset($current[$_GET['plugin']]); - update_option('active_plugins', $current); + $key = array_search($check_plugin, $current); + if ( false !== $key && NULL !== $key ) { + unset($current[$key]); + update_option('active_plugins', $current); + } } } ?>