35 $errorMessage =
$msg->getErrorMessage();
36 if ( !$errorMessage ) {
37 parent::__construct(
'badtitle',
'badtitletext', [] );
39 $errorMessageParams =
$msg->getErrorMessageParameters();
40 parent::__construct(
'badtitle', $errorMessage, $errorMessageParams );
50 public function report( $action = self::SEND_OUTPUT ) {
53 $wgOut->setStatusCode( 404 );
55 parent::report( self::STAGE_OUTPUT );
58 $wgOut->enableClientCache();
59 $wgOut->setCdnMaxage( 3600 );
61 if ( $action === self::SEND_OUTPUT ) {
68class_alias( BadTitleError::class,
'BadTitleError' );
if(MW_ENTRY_POINT==='index') if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgOut
An error page which can definitely be safely rendered using the OutputPage.
string MessageSpecifier $msg