mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 15:47:38 +02:00
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:
parent
b3bdab9622
commit
8789d023b2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user