X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexception%2FMWExceptionRenderer.php;h=66775bf61fa4497dcbba6f14a8378867fbeb6244;hb=c13fee87d42bdd6fdf6764edb6f6475c14c27749;hp=f99ce1cf9ebd6f5fcb4b83c5c3998fa29bdbddb1;hpb=578318e68856ef2f5258c67a50d815d06960e206;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php index f99ce1cf9e..66775bf61f 100644 --- a/includes/exception/MWExceptionRenderer.php +++ b/includes/exception/MWExceptionRenderer.php @@ -71,14 +71,12 @@ class MWExceptionRenderer { self::getShowBacktraceError( $e ); } $message .= "\n"; + } elseif ( $wgShowExceptionDetails ) { + $message = MWExceptionHandler::getLogMessage( $e ) . + "\nBacktrace:\n" . + MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n"; } else { - if ( $wgShowExceptionDetails ) { - $message = MWExceptionHandler::getLogMessage( $e ) . - "\nBacktrace:\n" . - MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n"; - } else { - $message = MWExceptionHandler::getPublicLogMessage( $e ); - } + $message = MWExceptionHandler::getPublicLogMessage( $e ); } echo nl2br( htmlspecialchars( $message ) ) . "\n"; } @@ -268,6 +266,7 @@ class MWExceptionRenderer { * Print a message, if possible to STDERR. * Use this in command line mode only (see isCommandLine) * + * @suppress SecurityCheck-XSS * @param string $message Failure text */ private static function printError( $message ) { @@ -323,47 +322,7 @@ class MWExceptionRenderer { htmlspecialchars( $e->getTraceAsString() ) . ''; } - $html .= '