getErrorMessage(); if ( !$errorMessage ) { parent::__construct( 'badtitle', 'badtitletext', array() ); } else { $errorMessageParams = $msg->getErrorMessageParameters(); $titleText = $msg->getTitleText(); if ( $titleText ) { $errorMessageParams[] = $titleText; } parent::__construct( 'badtitle', $errorMessage, $errorMessageParams ); } } else { parent::__construct( 'badtitle', $msg, $params ); } } /** * Just like ErrorPageError::report() but additionally set * a 400 HTTP status code (bug 33646). */ public function report() { global $wgOut; // bug 33646: a badtitle error page need to return an error code // to let mobile browser now that it is not a normal page. $wgOut->setStatusCode( 400 ); parent::report(); } }