Fix notice in plugin installer. See #9365 props sivel

git-svn-id: http://svn.automattic.com/wordpress/trunk@10820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-03-19 21:49:32 +00:00
parent 015c9e542e
commit 842c0927ef
1 changed files with 7 additions and 5 deletions

View File

@ -418,6 +418,7 @@ 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');
if ( is_object( $update_plugins ) ) {
foreach ( (array)$update_plugins->response as $file => $plugin ) {
if ( $plugin->slug === $api->slug ) {
$type = 'update_available';
@ -425,6 +426,7 @@ function install_plugin_information() {
break;
}
}
}
if ( 'install' == $type && is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) {
$installed_plugin = get_plugins('/' . $api->slug);
if ( ! empty($installed_plugin) ) {