Make WordPress Core


Ignore:
Timestamp:
11/20/2013 01:39:40 AM (11 years ago)
Author:
dd32
Message:

Appearance: Fix a PHP Notice when the update transient isn't available (for example, due to a timeout or being used offline). See #25948

File:
1 edited

Legend:

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

    r26216 r26278  
    367367    $updates = array();
    368368    if ( current_user_can( 'update_themes' ) ) {
    369         $updates = get_site_transient( 'update_themes' );
    370         $updates = $updates->response;
     369        $updates_transient = get_site_transient( 'update_themes' );
     370        if ( isset( $updates_transient->response ) ) {
     371            $updates = $updates_transient->response;
     372        }
    371373    }
    372374
    373375    WP_Theme::sort_by_name( $themes );
    374     foreach( $themes as $slug => $theme ) {
     376    foreach ( $themes as $slug => $theme ) {
    375377        $parent = false;
    376378        if ( $theme->parent() ) {
Note: See TracChangeset for help on using the changeset viewer.