X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexception%2FErrorPageError.php;h=4b1812673ff67e3693428a27341092e8cb9b5331;hb=9e8c3843746e1ecd68444fb99f59dd91d59e9349;hp=9b5a26821fa7d79cdcdf7e3ca5e130ca48197e47;hpb=8e622749cf468f4da8ca3dcb16777f9a56609aba;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/ErrorPageError.php b/includes/exception/ErrorPageError.php index 9b5a26821f..4b1812673f 100644 --- a/includes/exception/ErrorPageError.php +++ b/includes/exception/ErrorPageError.php @@ -39,7 +39,7 @@ class ErrorPageError extends MWException implements ILocalizedException { $this->msg = $msg; $this->params = $params; - // Bug 44111: Messages in the log files should be in English and not + // T46111: Messages in the log files should be in English and not // customized by the local wiki. So get the default English version for // passing to the parent constructor. Our overridden report() below // makes sure that the page shown to the user is not forced to English. @@ -61,9 +61,12 @@ class ErrorPageError extends MWException implements ILocalizedException { } public function report() { - global $wgOut; - - $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); - $wgOut->output(); + if ( self::isCommandLine() || defined( 'MW_API' ) ) { + parent::report(); + } else { + global $wgOut; + $wgOut->showErrorPage( $this->title, $this->msg, $this->params ); + $wgOut->output(); + } } }