Change-Id: Ia297d9d0f893451a611051f9df7db3870b4c2333
* @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;
}
/**
* @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 ) {