r100720 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100719‎ | r100720 | r100721 >
Date:18:14, 25 October 2011
Author:ialex
Status:ok
Tags:
Comment:
Unstub $wgLang if still stubbed before storing it; avoid storing a StubUserLang instance in ParserOptions and errors when getting the object (per report of Lockal on IRC)
Modified paths:
  • /trunk/phase3/includes/parser/ParserOptions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserOptions.php
@@ -195,6 +195,9 @@
196196 }
197197 if ( $lang === null ) {
198198 global $wgLang;
 199+ if ( !StubObject::isRealObject( $wgLang ) ) {
 200+ $wgLang->_unstub();
 201+ }
199202 $lang = $wgLang;
200203 }
201204 $this->initialiseFromUser( $user, $lang );

Status & tagging log