r85581 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85580‎ | r85581 | r85582 >
Date:21:36, 6 April 2011
Author:platonides
Status:ok
Tags:
Comment:
r85553 fixup. When there are variants involved, the line
$GLOBALS['wgContLang'] = $context->lang;
is not assigning $wgContLang the same $langObj instantiated a couple of lines above, but a different object obtained from the user code, breaking variant parsertestsw..
Modified paths:
  • /trunk/phase3/tests/parser/parserTest.inc (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/parser/NewParserTest.php
@@ -297,10 +297,9 @@
298298
299299 $langObj = Language::factory( $lang );
300300 $GLOBALS['wgContLang'] = $langObj;
301 -
302301 $context = new RequestContext();
303302 $GLOBALS['wgLang'] = $context->lang;
304 - $GLOBALS['wgContLang'] = $context->lang;
 303+
305304 $GLOBALS['wgMemc'] = new EmptyBagOStuff;
306305 $GLOBALS['wgOut'] = new $context->output;
307306
Index: trunk/phase3/tests/parser/parserTest.inc
@@ -682,10 +682,9 @@
683683
684684 $langObj = Language::factory( $lang );
685685 $GLOBALS['wgContLang'] = $langObj;
686 -
687686 $context = new RequestContext();
688 - $GLOBALS['wgLang'] = $context->lang;
689 - $GLOBALS['wgContLang'] = $context->lang;
 687+ $GLOBALS['wgLang'] = $context->getLang();
 688+
690689 $GLOBALS['wgMemc'] = new EmptyBagOStuff;
691690 $GLOBALS['wgOut'] = new $context->output;
692691

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85553Follow-up r85403: fix fatal in parser tests.happy-melon17:39, 6 April 2011

Status & tagging log