http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100720

Revision: 100720
Author:   ialex
Date:     2011-10-25 18:14:30 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
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: trunk/phase3/includes/parser/ParserOptions.php
===================================================================
--- trunk/phase3/includes/parser/ParserOptions.php      2011-10-25 18:11:46 UTC 
(rev 100719)
+++ trunk/phase3/includes/parser/ParserOptions.php      2011-10-25 18:14:30 UTC 
(rev 100720)
@@ -195,6 +195,9 @@
                }
                if ( $lang === null ) {
                        global $wgLang;
+                       if ( !StubObject::isRealObject( $wgLang ) ) {
+                               $wgLang->_unstub();
+                       }
                        $lang = $wgLang;
                }
                $this->initialiseFromUser( $user, $lang );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to