Fix a strict standards error in the plugin search when search for an already installed plugin.

Fixes #24747 props SergeyBiryukov.


git-svn-id: https://develop.svn.wordpress.org/trunk@24725 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2013-07-17 21:08:05 +00:00
parent ff7532e518
commit 507b203597

View File

@ -229,7 +229,8 @@ function install_plugin_install_status($api, $loop = false) {
if ( current_user_can('install_plugins') )
$url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
} else {
$key = array_shift( $key = array_keys($installed_plugin) ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers
$key = array_keys( $installed_plugin );
$key = array_shift( $key ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers
if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){
$status = 'latest_installed';
} elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) {