(bug 27054) Implicit end of statement can break stuff when files are combined. Applie...
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 14 Mar 2011 14:25:23 +0000 (14:25 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 14 Mar 2011 14:25:23 +0000 (14:25 +0000)
includes/resourceloader/ResourceLoader.php

index 8903e5b..86883ed 100644 (file)
@@ -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