From 5ac059e12c3b1dd747e01c9a14c4935628f3086b Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 11 Apr 2012 20:15:31 +0000 Subject: [PATCH] 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 --- wp-admin/includes/update.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index c1ffd3c305..05b1736819 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -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;