Fix warnings in wp_plugin_update_rows(), see #10464

git-svn-id: http://svn.automattic.com/wordpress/trunk@11785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-08-07 09:33:40 +00:00
parent 8aa2598b6a
commit 46dcb545db
1 changed files with 5 additions and 3 deletions

View File

@ -147,9 +147,11 @@ function update_right_now_message() {
function wp_plugin_update_rows() {
$plugins = get_transient( 'update_plugins' );
$plugins = array_keys( $plugins->response );
foreach( $plugins as $plugin_file ) {
add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
if ( isset($plugins->response) && is_array($plugins->response) ) {
$plugins = array_keys( $plugins->response );
foreach( $plugins as $plugin_file ) {
add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
}
}
}
add_action( 'admin_init', 'wp_plugin_update_rows' );