X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FMessage.php;h=5a4b810d1e44fcfe69ab70162d002adb54da8963;hb=c2b3c1cf671d360910b6234da481c230bbe2a730;hp=824f1771fe30e1ac47940bdfe507ca655637e1a3;hpb=1162a32ef22973ba3c92b7b91c146deef217be10;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Message.php b/includes/Message.php index 824f1771fe..5a4b810d1e 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -618,7 +618,7 @@ class Message { } elseif ( !is_array( $param ) ) { return array( 'before', $param ); } else { - throw new MWException( "Invalid message parameter" ); + throw new MWException( "Invalid message parameter: " . serialize( $param ) ); } } @@ -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; } /**