From e882babdbe6b585f4e114b1a8a54ac05cb54cd96 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 1 Nov 2012 10:13:30 -0700 Subject: [PATCH] Fixed MessageCache::parseText() and fixed docs for MessageCache::parse() Change-Id: Ia297d9d0f893451a611051f9df7db3870b4c2333 --- includes/Message.php | 3 ++- includes/cache/MessageCache.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Message.php b/includes/Message.php index 2feaed2b71..5a4b810d1e 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -629,7 +629,8 @@ class Message { * @return string Wikitext parsed into HTML */ protected function parseText( $string ) { - return MessageCache::singleton()->parse( $string, $this->title, /*linestart*/true, $this->interface, $this->language )->getText(); + $out = MessageCache::singleton()->parse( $string, $this->title, /*linestart*/true, $this->interface, $this->language ); + return is_object( $out ) ? $out->getText() : $out; } /** diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index 148e26b38e..9bf743667d 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -820,7 +820,7 @@ class MessageCache { * @param $linestart bool * @param $interface bool * @param $language - * @return ParserOutput + * @return ParserOutput|string */ public function parse( $text, $title = null, $linestart = true, $interface = false, $language = null ) { if ( $this->mInParser ) { -- 2.20.1