Unknown features shouldn't break style output

If a new feature is added, it should be safe for skins to use it
without breaking their backwards compatibility.

For example if the normalize feature in 1.36 is being used a skin
should be able to use it, and then using version_compare add additional
styles for older versions of mediawiki

Bug: T271441
Change-Id: I074415970455ef701b48d11ff97c01af24197eeb
This commit is contained in:
jdlrobson 2021-01-07 09:18:18 -08:00
parent e3c1334e8f
commit 381499a675

View file

@ -190,7 +190,8 @@ class ResourceLoaderSkinModule extends ResourceLoaderLessVarFileModule {
$compatibilityMode = true;
}
if ( !isset( self::FEATURE_FILES[$feature] ) || !isset( self::DEFAULT_FEATURES[$feature] ) ) {
throw new InvalidArgumentException( "Feature `$key` is not recognised" );
// We could be an old version of MediaWiki and a new feature is being requested (T271441).
continue;
}
}
// If the module didn't specify an option use the default features values.