ResourceLoaderSkinModule: Fix SkinStyles extending of known media queries
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 16 Jun 2017 19:25:41 +0000 (21:25 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 10 Jul 2017 17:53:00 +0000 (19:53 +0200)
commit171bcfaae9aa28ee356a62e5e1d273823ae3cd9e
treeacce27e2e12250100f218fe566cfcf675694d65e
parentd14faa6bedf8cb5e400f910860e05a6f98709d01
ResourceLoaderSkinModule: Fix SkinStyles extending of known media queries

If any of the styles given in its module definition (in the
'styles' or 'skinStyles' properties) used the same media queries
as the module's own CSS (e.g. 'all'), the module would fail with
"PHP Fatal error: [] operator not supported for strings" because
FileModule defaults to merging all the stylesheets into a single
string.

Fix this by ensuring they are arrays before trying to extend them.

This previously made it impossible to use $wgResourceModuleSkinStyles
for modules that use SkinModule (instead of plain FileModule), such as
the 'mediawiki.skinning.interface' module.

Bug: T168088
Change-Id: I3effcaa4982728e707fbf9efeec4e5e78fc8aab6
includes/resourceloader/ResourceLoaderSkinModule.php