From: Timo Tijhof Date: Tue, 2 Apr 2013 20:31:20 +0000 (+0200) Subject: ResourceLoader: Change $module by ref instead of resetting the key X-Git-Tag: 1.31.0-rc.0~20130^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=8201b7e2dec71e46ba183f22232eac1c80d8b8e9;p=lhc%2Fweb%2Fwiklou.git ResourceLoader: Change $module by ref instead of resetting the key Change-Id: I8590352b52ecf51def21a9c52af85aba0f050ff8 --- diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 589a3544ce..9abd1fa536 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -286,12 +286,12 @@ class ResourceLoader { // Add the testrunner (which configures QUnit) to the dependencies. // Since it must be ready before any of the test suites are executed. - foreach( $testModules['qunit'] as $moduleName => $moduleProps ) { + foreach( $testModules['qunit'] as &$module ) { // Make sure all test modules are top-loading so that when QUnit starts // on document-ready, it will run once and finish. If some tests arrive // later (possibly after QUnit has already finished) they will be ignored. - $testModules['qunit'][$moduleName]['position'] = 'top'; - $testModules['qunit'][$moduleName]['dependencies'][] = 'mediawiki.tests.qunit.testrunner'; + $module['position'] = 'top'; + $module['dependencies'][] = 'mediawiki.tests.qunit.testrunner'; } foreach( $testModules as $id => $names ) {