From 8789d023b228dcc5dbd9dc9b6025f2631cda1bca Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@20438 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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;