From 6557b319c45f8657ed665bec3bbce14a1079918f Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 11 Sep 2012 02:12:34 +0000 Subject: [PATCH] Use the key we found using array_search() to unset it from the array. props hakre. fixes #16562. git-svn-id: https://develop.svn.wordpress.org/trunk@21812 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index a573599a5d..79c44d436a 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -606,7 +606,7 @@ function deactivate_plugins( $plugins, $silent = false, $network_wide = null ) { $key = array_search( $plugin, $current ); if ( false !== $key ) { $do_blog = true; - array_splice( $current, $key, 1 ); + unset( $current[ $key ] ); } }