From e78ef2fc43777039da5afe382745188adb7944f2 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 14 Nov 2011 23:56:18 +0000 Subject: [PATCH] Check is_array() against get_themes() in get_theme(). props cgrymala, see #19244. git-svn-id: http://svn.automattic.com/wordpress/trunk@19287 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index c76414ac23..b132364b4b 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -496,7 +496,7 @@ function get_theme_roots() { function get_theme($theme) { $themes = get_themes(); - if ( array_key_exists($theme, $themes) ) + if ( is_array( $themes ) && array_key_exists( $theme, $themes ) ) return $themes[$theme]; return null;