mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Add some type sanity checks. Props DD32. fixes #7800
git-svn-id: http://svn.automattic.com/wordpress/trunk@9227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c921aa8b0d
commit
bada5d787a
@ -74,9 +74,9 @@ function theme_update_available( $theme ) {
|
||||
if ( !isset($themes_update) )
|
||||
$themes_update = get_option('update_themes');
|
||||
|
||||
if ( isset($theme->stylesheet) )
|
||||
if ( is_object($theme) && isset($theme->stylesheet) )
|
||||
$stylesheet = $theme->stylesheet;
|
||||
elseif ( isset($theme['Stylesheet']) )
|
||||
elseif ( is_array($theme) && isset($theme['Stylesheet']) )
|
||||
$stylesheet = $theme['Stylesheet'];
|
||||
else
|
||||
return false; //No valid info passed.
|
||||
|
Loading…
Reference in New Issue
Block a user