From 852b0dcfa7801dea980625cde2135dceb3482b8b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 3 Dec 2007 20:38:06 +0000 Subject: [PATCH] @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. --- includes/Parser.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- 2.20.1