From: Timo Tijhof Date: Mon, 25 Jun 2018 18:25:36 +0000 (+0100) Subject: resourceloader: Fix duplicate semi-colon in generated startup code X-Git-Tag: 1.34.0-rc.0~4969^2 X-Git-Url: https://git.cyclocoop.org/%27%20.%20%24this-%3EgetSkin%28%29-%3EescapeSearchLink%28%29%20.%20%27?a=commitdiff_plain;h=1d1178535f14868911b16b2437faf0642ef7b657;p=lhc%2Fweb%2Fwiklou.git resourceloader: Fix duplicate semi-colon in generated startup code The startup.js template used '$CODE.registrations();', which makes sense syntatically (and for the linter), but the substitution logic was only replacing the '$CODE.registrations()' portion. This made the generated output contain two consecutive semi-colons. Change-Id: Ibef1a0d932b19037987a7effa12aa57f578a142d --- diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 4777545d23..120f559fc6 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -396,7 +396,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { // This url may be preloaded. See getPreloadLinks(). '$VARS.baseModulesUri' => self::getStartupModulesUrl( $context ), ] ); - $pairs['$CODE.registrations()'] = str_replace( + $pairs['$CODE.registrations();'] = str_replace( "\n", "\n\t", trim( $this->getModuleRegistrations( $context ) )