Merge "Handle no pageids response field in MessagePoster factory"
[lhc/web/wiklou.git] / includes / exception / HttpError.php
index aba9176..b910ec6 100644 (file)
@@ -35,7 +35,7 @@ class HttpError extends MWException {
         *
         * @param int $httpCode HTTP status code to send to the client
         * @param string|Message $content Content of the message
-        * @param string|Message $header Content of the header (\<title\> and \<h1\>)
+        * @param string|Message|null $header Content of the header (\<title\> and \<h1\>)
         */
        public function __construct( $httpCode, $content, $header = null ) {
                parent::__construct( $content );
@@ -74,9 +74,7 @@ class HttpError extends MWException {
        public function report() {
                $this->doLog();
 
-               $httpMessage = HttpStatus::getMessage( $this->httpCode );
-
-               header( "Status: {$this->httpCode} {$httpMessage}", true, $this->httpCode );
+               HttpStatus::header( $this->httpCode );
                header( 'Content-type: text/html; charset=utf-8' );
 
                print $this->getHTML();