diff --git a/app/Views/errors/html/error_exception.php b/app/Views/errors/html/error_exception.php index 4ddeac1a2ec4..60fb16c2f899 100644 --- a/app/Views/errors/html/error_exception.php +++ b/app/Views/errors/html/error_exception.php @@ -314,7 +314,7 @@ - +
Response StatusgetStatusCode() . ' - ' . $response->getReason()) ?>getStatusCode() . ' - ' . $response->getReasonPhrase()) ?>
diff --git a/system/HTTP/ResponseTrait.php b/system/HTTP/ResponseTrait.php index 412e7b970e7c..0e945b6288f1 100644 --- a/system/HTTP/ResponseTrait.php +++ b/system/HTTP/ResponseTrait.php @@ -467,7 +467,7 @@ public function sendHeaders() } // HTTP Status - header(sprintf('HTTP/%s %s %s', $this->getProtocolVersion(), $this->getStatusCode(), $this->getReason()), true, $this->getStatusCode()); + header(sprintf('HTTP/%s %s %s', $this->getProtocolVersion(), $this->getStatusCode(), $this->getReasonPhrase()), true, $this->getStatusCode()); // Send all of our headers foreach (array_keys($this->getHeaders()) as $name) { diff --git a/tests/system/HTTP/DownloadResponseTest.php b/tests/system/HTTP/DownloadResponseTest.php index 736558dcf9d2..5c66052f164d 100644 --- a/tests/system/HTTP/DownloadResponseTest.php +++ b/tests/system/HTTP/DownloadResponseTest.php @@ -277,7 +277,7 @@ public function testThrowExceptionWhenNoSetDownloadSource() public function testGetReason() { $response = new DownloadResponse('unit-test.php', false); - $this->assertSame('OK', $response->getReason()); + $this->assertSame('OK', $response->getReasonPhrase()); } public function testPretendOutput()