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
This commit is contained in:
nacin 2012-04-11 20:15:31 +00:00
parent b3bdab9622
commit 8789d023b2

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;