From: Brion Vibber Date: Mon, 3 Dec 2007 20:38:06 +0000 (+0000) Subject: @fixme this is probably *horribly wrong* X-Git-Tag: 1.31.0-rc.0~50568 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=852b0dcfa7801dea980625cde2135dceb3482b8b;p=lhc%2Fweb%2Fwiklou.git @fixme this is probably *horribly wrong* LanguageConverter seems to want $wgParser's uniqPrefix, however if this is called for a parser cache hit, the parser may not have ever been initialized in the first place. Not really sure what the heck is supposed to be going on here... For now, returning an empty string '' without dying out, but leaving a stub exception comment in for testing. --- diff --git a/includes/Parser.php b/includes/Parser.php index e32ac7a23f..2899a11c7a 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -255,6 +255,15 @@ class Parser * @public */ function uniqPrefix() { + if( !isset( $this->mUniqPrefix ) ) { + // @fixme this is probably *horribly wrong* + // LanguageConverter seems to want $wgParser's uniqPrefix, however + // if this is called for a parser cache hit, the parser may not + // have ever been initialized in the first place. + // Not really sure what the heck is supposed to be going on here. + return ''; + //throw new MWException( "Accessing uninitialized mUniqPrefix" ); + } return $this->mUniqPrefix; }