From: Bartosz DziewoƄski Date: Thu, 7 May 2015 13:51:09 +0000 (+0200) Subject: resourceloader: Fix fatal when using $wgResourceModuleSkinStyles with "+" X-Git-Tag: 1.31.0-rc.0~11476 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=5a5784a58d0c100c960e3a8bad08c9253b25b25a;p=lhc%2Fweb%2Fwiklou.git resourceloader: Fix fatal when using $wgResourceModuleSkinStyles with "+" Fatal error: [] operator not supported for strings in includes/resourceloader/ResourceLoader.php on line 354 This would occur when a skin customized ResourceModuleSkinStyles using the '+' syntax, which preserves default skinStyles, and the default skinStyles was defined as a string rather than array. Change-Id: I6cd12a638d562c75bc4704e098de84f3882248b6 --- diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 7da3aec8e7..ce18c32add 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -339,7 +339,7 @@ class ResourceLoader { } elseif ( isset( $skinStyles['+' . $name] ) ) { $paths = (array)$skinStyles['+' . $name]; $styleFiles = isset( $this->moduleInfos[$name]['skinStyles']['default'] ) ? - $this->moduleInfos[$name]['skinStyles']['default'] : + (array)$this->moduleInfos[$name]['skinStyles']['default'] : array(); } else { continue;