Check if the response property is set before continuing with the update_themes transient return value. props johnbillion, fixes #20378.

git-svn-id: https://develop.svn.wordpress.org/trunk@20438 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-04-11 20:15:31 +00:00
parent 33052a4d1a
commit 5ac059e12c
1 changed files with 4 additions and 1 deletions

View File

@ -219,8 +219,11 @@ function wp_update_plugin($plugin, $feedback = '') {
function get_theme_updates() {
$themes = wp_get_themes();
$current = get_site_transient('update_themes');
$update_themes = array();
if ( ! isset( $current->response ) )
return array();
$update_themes = array();
foreach ( $current->response as $stylesheet => $data ) {
$update_themes[ $stylesheet ] = wp_get_theme( $stylesheet );
$update_themes[ $stylesheet ]->update = $data;