normalizeKey() should have already handled this.
Change-Id: Idf2510ec86841ed18d589f392a30db1b41ac0c24
*/
static function &newFromKey( $key ) {
wfDeprecated( __METHOD__, '1.24' );
- global $wgFallbackSkin;
$key = Skin::normalizeKey( $key );
$factory = SkinFactory::getDefaultInstance();
- try {
- $skin = $factory->makeSkin( $key );
- } catch ( SkinException $e ) {
- $skin = $factory->makeSkin( $wgFallbackSkin );
- }
+ // normalizeKey() guarantees that a skin with this key will exist.
+ $skin = $factory->makeSkin( $key );
return $skin;
}