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
This commit is contained in:
parent
8f4fd39550
commit
e78ef2fc43
|
@ -496,7 +496,7 @@ function get_theme_roots() {
|
||||||
function get_theme($theme) {
|
function get_theme($theme) {
|
||||||
$themes = get_themes();
|
$themes = get_themes();
|
||||||
|
|
||||||
if ( array_key_exists($theme, $themes) )
|
if ( is_array( $themes ) && array_key_exists( $theme, $themes ) )
|
||||||
return $themes[$theme];
|
return $themes[$theme];
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue