Fix a strict standards error in the plugin search when search for an already installed plugin.
Fixes #24747 props SergeyBiryukov. git-svn-id: http://core.svn.wordpress.org/trunk@24725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0cb7fbacc8
commit
398ce8ecdf
|
@ -229,7 +229,8 @@ function install_plugin_install_status($api, $loop = false) {
|
||||||
if ( current_user_can('install_plugins') )
|
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);
|
$url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug);
|
||||||
} else {
|
} 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'], '=') ){
|
if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){
|
||||||
$status = 'latest_installed';
|
$status = 'latest_installed';
|
||||||
} elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) {
|
} elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) {
|
||||||
|
|
Loading…
Reference in New Issue