X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fexception%2FMWExceptionRenderer.php;h=b22e87bf4a318574b5a8ad9d548b503b11fb0ec9;hb=9f3bc1fe5978c24230d0b6a92a83560f9d638a18;hp=2eb821ae693585e7cfeda422b24444438de1ec32;hpb=10d1b7d12b5d097413cd507740c5c71781c2580b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php index 2eb821ae69..b22e87bf4a 100644 --- a/includes/exception/MWExceptionRenderer.php +++ b/includes/exception/MWExceptionRenderer.php @@ -33,7 +33,7 @@ class MWExceptionRenderer { /** * @param Exception|Throwable $e Original exception - * @param integer $mode MWExceptionExposer::AS_* constant + * @param int $mode MWExceptionExposer::AS_* constant * @param Exception|Throwable|null $eNew New exception from attempting to show the first */ public static function output( $e, $mode, $eNew = null ) { @@ -128,7 +128,7 @@ class MWExceptionRenderer { // Show any custom GUI message before the details if ( $e instanceof MessageSpecifier ) { - $wgOut->addHTML( Message::newFromSpecifier( $e )->escaped() ); + $wgOut->addHTML( Html::element( 'p', [], Message::newFromSpecifier( $e )->text() ) ); } $wgOut->addHTML( self::getHTML( $e ) ); @@ -169,14 +169,15 @@ class MWExceptionRenderer { } else { $logId = WebRequest::getRequestId(); $html = "
" . - '[' . $logId . '] ' . - gmdate( 'Y-m-d H:i:s' ) . ": " . - self::msg( "internalerror-fatal-exception", - "Fatal exception of type $1", - get_class( $e ), - $logId, - MWExceptionHandler::getURL() - ) . "
\n" . + htmlspecialchars( + '[' . $logId . '] ' . + gmdate( 'Y-m-d H:i:s' ) . ": " . + self::msg( "internalerror-fatal-exception", + "Fatal exception of type $1", + get_class( $e ), + $logId, + MWExceptionHandler::getURL() + ) ) . "\n" . ""; } @@ -211,7 +212,7 @@ class MWExceptionRenderer { "\nBacktrace:\n" . MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n"; } else { - return self::getShowBacktraceError( $e ); + return self::getShowBacktraceError( $e ) . "\n"; } } @@ -242,7 +243,7 @@ class MWExceptionRenderer { $vars[] = '$wgShowDBErrorBacktrace = true;'; } $vars = implode( ' and ', $vars ); - return "Set $vars at the bottom of LocalSettings.php to show detailed debugging information\n"; + return "Set $vars at the bottom of LocalSettings.php to show detailed debugging information."; } /** @@ -262,7 +263,7 @@ class MWExceptionRenderer { } /** - * @param integer $code + * @param int $code */ private static function statusHeader( $code ) { if ( !headers_sent() ) {