WordPress.org

Make WordPress Core

Ticket #20378: 20378.patch

File 20378.patch, 732 bytes (added by johnbillion, 3 years ago)
  • wp-admin/includes/update.php

     
    221221        $current = get_site_transient('update_themes'); 
    222222        $update_themes = array(); 
    223223 
    224         foreach ( $current->response as $stylesheet => $data ) { 
    225                 $update_themes[ $stylesheet ] = wp_get_theme( $stylesheet ); 
    226                 $update_themes[ $stylesheet ]->update = $data; 
     224        if ( isset( $current->response ) ) { 
     225                foreach ( $current->response as $stylesheet => $data ) { 
     226                        $update_themes[ $stylesheet ] = wp_get_theme( $stylesheet ); 
     227                        $update_themes[ $stylesheet ]->update = $data; 
     228                } 
    227229        } 
    228230 
    229231        return $update_themes;