From bada5d787aecf3024f1d8f3e659a1a6bb3d3c10b Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 17 Oct 2008 18:30:04 +0000 Subject: [PATCH] Add some type sanity checks. Props DD32. fixes #7800 git-svn-id: http://svn.automattic.com/wordpress/trunk@9227 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/themes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/themes.php b/wp-admin/themes.php index a921c34ef5..483f6633dd 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -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.