From bd7ad452345518e4c32fe2d1cf2964e52d04ba84 Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 16 Apr 2012 18:37:57 +0000 Subject: [PATCH] Add arrays together in WP_Theme::get_allowed() to preserve keys (theme names could be numeric). props ocean90, fixes #15306. git-svn-id: http://svn.automattic.com/wordpress/trunk@20481 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-theme.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index 7c2c5d77e..ef8492427 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -1140,7 +1140,7 @@ final class WP_Theme implements ArrayAccess { * @return array Array of stylesheet names. */ public static function get_allowed( $blog_id = null ) { - return array_merge( self::get_allowed_on_network(), self::get_allowed_on_site( $blog_id ) ); + return self::get_allowed_on_network() + self::get_allowed_on_site( $blog_id ); } /** @@ -1214,7 +1214,7 @@ final class WP_Theme implements ArrayAccess { } } - return $allowed_themes[ $blog_id ]; + return (array) $allowed_themes[ $blog_id ]; } /**