From b0503fe47a53546f28a63ec0955080a21fe6e39e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Sun, 10 Aug 2014 03:24:58 +0200 Subject: [PATCH] Skin: Don't double-check for non-existing skin in newFromKey() normalizeKey() should have already handled this. Change-Id: Idf2510ec86841ed18d589f392a30db1b41ac0c24 --- includes/skins/Skin.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 6ba1efd992..c4de2ad78a 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -148,16 +148,12 @@ abstract class Skin extends ContextSource { */ 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; } -- 2.20.1