From aa450a1d3ac5d44dce8827dbff8c0c06ff7324a6 Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@20481 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 7c2c5d77e9..ef84924272 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 ]; } /**