Merge "RCFilters: Fix highlight circle misalignment"
[lhc/web/wiklou.git] / includes / exception / MWExceptionRenderer.php
index 5162a1f..bb5e4f4 100644 (file)
@@ -16,7 +16,6 @@
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
- * @author Aaron Schulz
  */
 
 use Wikimedia\Rdbms\DBConnectionError;
@@ -34,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 ) {
@@ -212,7 +211,7 @@ class MWExceptionRenderer {
                                "\nBacktrace:\n" .
                                MWExceptionHandler::getRedactedTraceAsString( $e ) . "\n";
                } else {
-                       return self::getShowBacktraceError( $e );
+                       return self::getShowBacktraceError( $e ) . "\n";
                }
        }
 
@@ -243,7 +242,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.";
        }
 
        /**
@@ -263,7 +262,7 @@ class MWExceptionRenderer {
        }
 
        /**
-        * @param integer $code
+        * @param int $code
         */
        private static function statusHeader( $code ) {
                if ( !headers_sent() ) {
@@ -306,7 +305,7 @@ class MWExceptionRenderer {
                if ( $wgShowHostnames || $wgShowSQLErrors ) {
                        $info = str_replace(
                                '$1',
-                               Html::element( 'span', [ 'dir' => 'ltr' ], htmlspecialchars( $e->getMessage() ) ),
+                               Html::element( 'span', [ 'dir' => 'ltr' ], $e->getMessage() ),
                                htmlspecialchars( self::msg( 'dberr-info', '($1)' ) )
                        );
                } else {