Fix notice in plugin installer. See #9365 props sivel
git-svn-id: https://develop.svn.wordpress.org/trunk@10820 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c603afc1f0
commit
8c818f3ab6
@ -418,11 +418,13 @@ function install_plugin_information() {
|
||||
$type = 'install';
|
||||
//Check to see if this plugin is known to be installed, and has an update awaiting it.
|
||||
$update_plugins = get_option('update_plugins');
|
||||
foreach ( (array)$update_plugins->response as $file => $plugin ) {
|
||||
if ( $plugin->slug === $api->slug ) {
|
||||
$type = 'update_available';
|
||||
$update_file = $file;
|
||||
break;
|
||||
if ( is_object( $update_plugins ) ) {
|
||||
foreach ( (array)$update_plugins->response as $file => $plugin ) {
|
||||
if ( $plugin->slug === $api->slug ) {
|
||||
$type = 'update_available';
|
||||
$update_file = $file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( 'install' == $type && is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user