*
* showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) );
* showErrorPage( 'titlemsg', $messageObject );
+ * showErrorPage( $titleMessageObj, $messageObject );
*
- * @param $title String: message key for page title
+ * @param $title Mixed: message key (string) for page title, or a Message object
* @param $msg Mixed: message key (string) for page text, or a Message object
* @param $params Array: message parameters; ignored if $msg is a Message object
*/
public function showErrorPage( $title, $msg, $params = array() ) {
- $this->prepareErrorPage( $this->msg( $title ), $this->msg( 'errorpagetitle' ) );
+ if( !$title instanceof Message ) {
+ $title = $this->msg( $title );
+ }
+
+ $this->prepareErrorPage( $title, $this->msg( 'errorpagetitle' ) );
if ( $msg instanceof Message ){
$this->addHTML( $msg->parse() );