diff --git a/wp-includes/theme.php b/wp-includes/theme.php index c76414ac2..b132364b4 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;