From cb59a1db62cefc04e973c99b8f2a788b0aa3f03e Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@2932 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 da5c9645c2..1e414b4a9d 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); + } } } ?>