Merge "mw.htmlform: Fix hiding of the textbox for 'selectorother' fields on page...
[lhc/web/wiklou.git] / includes / exception / HttpError.php
index b910ec6..f464d8a 100644 (file)
@@ -31,8 +31,6 @@ class HttpError extends MWException {
        private $httpCode, $header, $content;
 
        /**
-        * Constructor
-        *
         * @param int $httpCode HTTP status code to send to the client
         * @param string|Message $content Content of the message
         * @param string|Message|null $header Content of the header (\<title\> and \<h1\>)
@@ -88,11 +86,11 @@ class HttpError extends MWException {
                        $content = $content->text();
                }
 
-               $context = array(
+               $context = [
                        'file' => $this->getFile(),
                        'line' => $this->getLine(),
                        'http_code' => $this->httpCode,
-               );
+               ];
 
                $logMsg = "$content ({http_code}) from {file}:{line}";
 
@@ -121,7 +119,7 @@ class HttpError extends MWException {
                if ( $this->content instanceof Message ) {
                        $contentHtml = $this->content->escaped();
                } else {
-                       $contentHtml = htmlspecialchars( $this->content );
+                       $contentHtml = nl2br( htmlspecialchars( $this->content ) );
                }
 
                return "<!DOCTYPE html>\n" .