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
This commit is contained in:
nacin 2012-04-16 18:37:57 +00:00
parent c2422f4596
commit bd7ad45234
1 changed files with 2 additions and 2 deletions

View File

@ -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 ];
}
/**