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
This commit is contained in:
Andrew Nacin 2012-09-11 02:12:34 +00:00
parent 56c0d2932c
commit 6557b319c4

View File

@ -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 ] );
}
}