Merge "Check for error before outputting srcset urls"
[lhc/web/wiklou.git] / includes / skins / Skin.php
index 6ba1efd..dc06eba 100644 (file)
@@ -144,20 +144,16 @@ abstract class Skin extends ContextSource {
         * Factory method for loading a skin of a given type
         * @param string $key 'monobook', 'vector', etc.
         * @return Skin
-        * @deprecated Use SkinFactory instead
+        * @deprecated since 1.24; Use SkinFactory instead
         */
        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;
        }
 
@@ -419,9 +415,9 @@ abstract class Skin extends ContextSource {
                return "$numeric $type $name";
        }
 
-       /*
+       /**
         * Return values for <html> element
-        * @return array of associative name-to-value elements for <html> element
+        * @return array Array of associative name-to-value elements for <html> element
         */
        public function getHtmlElementAttributes() {
                $lang = $this->getLanguage();