Add some type sanity checks. Props DD32. fixes #7800
git-svn-id: https://develop.svn.wordpress.org/trunk@9227 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
73cf4cc90d
commit
68a1f4a6bb
@ -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…
x
Reference in New Issue
Block a user