From: Roan Kattouw Date: Mon, 14 Mar 2011 14:25:23 +0000 (+0000) Subject: (bug 27054) Implicit end of statement can break stuff when files are combined. Applie... X-Git-Tag: 1.31.0-rc.0~31421 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=15bcd02d4c4604c4874633e22399ee359ad49db5;p=lhc%2Fweb%2Fwiklou.git (bug 27054) Implicit end of statement can break stuff when files are combined. Applied patch by Paul Copperman: add a semicolon to the end of every module when combining; this'll terminate any unterminated final statement, and otherwise create a harmless empty statement. --- diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 8903e5b6a6..86883eddaa 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -468,7 +468,9 @@ class ResourceLoader { // Scripts $scripts = ''; if ( $context->shouldIncludeScripts() ) { - $scripts .= $module->getScript( $context ) . "\n"; + // bug 27054: Append semicolon to prevent weird bugs + // caused by files not terminating their statements right + $scripts .= $module->getScript( $context ) . ";\n"; } // Styles