X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fexception%2FMWExceptionRenderer.php;h=dc8dfd0b3ec10c8cc9c715764c111ca0e3fe10f4;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hp=bb5e4f4eda915f489bc034c6df86085426f82224;hpb=5256bb8ce2da1390f84ef535d990129eebd74fd2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/exception/MWExceptionRenderer.php b/includes/exception/MWExceptionRenderer.php index bb5e4f4eda..dc8dfd0b3e 100644 --- a/includes/exception/MWExceptionRenderer.php +++ b/includes/exception/MWExceptionRenderer.php @@ -90,7 +90,7 @@ class MWExceptionRenderer { private static function useOutputPage( $e ) { // Can the extension use the Message class/wfMessage to get i18n-ed messages? foreach ( $e->getTrace() as $frame ) { - if ( isset( $frame['class'] ) && $frame['class'] === 'LocalisationCache' ) { + if ( isset( $frame['class'] ) && $frame['class'] === LocalisationCache::class ) { return false; } } @@ -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" . ""; }