Make WordPress Core

Changeset 11785


Ignore:
Timestamp:
08/07/2009 09:33:40 AM (17 years ago)
Author:
azaozz
Message:

Fix warnings in wp_plugin_update_rows(), see #10464

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r11775 r11785  
    148148function wp_plugin_update_rows() {
    149149        $plugins = get_transient( 'update_plugins' );
    150         $plugins = array_keys( $plugins->response );
    151         foreach( $plugins as $plugin_file ) {
    152                 add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
     150        if ( isset($plugins->response) && is_array($plugins->response) ) {
     151                $plugins = array_keys( $plugins->response );
     152                foreach( $plugins as $plugin_file ) {
     153                        add_action( "after_plugin_row_$plugin_file", 'wp_plugin_update_row', 10, 2 );
     154                }
    153155        }
    154156}
Note: See TracChangeset for help on using the changeset viewer.