bug 33035: Followup r105925: set to null rather than unset so we don't get an undefin...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 13 Dec 2011 19:58:44 +0000 (19:58 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 13 Dec 2011 19:58:44 +0000 (19:58 +0000)
Apparently the unset() in Language::setCode() could cause the later is_null check in getHtmlCode() to fail, though I could not reproduce it myself.

languages/Language.php

index 7d4041a..dfc0c8b 100644 (file)
@@ -3484,7 +3484,7 @@ class Language {
        public function setCode( $code ) {
                $this->mCode = $code;
                // Ensure we don't leave an incorrect html code lying around
-               unset( $this->mHtmlCode );
+               $this->mHtmlCode = null;
        }
 
        /**