From 8c818f3ab6907d6cfc85a271c8a2b25a29f84cdc Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 19 Mar 2009 21:49:32 +0000 Subject: [PATCH] Fix notice in plugin installer. See #9365 props sivel git-svn-id: https://develop.svn.wordpress.org/trunk@10820 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/plugin-install.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 49da3890c9..1bfaecc354 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -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 ) ) {