Skip to content

Commit efa0d08

Browse files
committed
Fix deprecated methods
1 parent e3ed849 commit efa0d08

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/Debug/Exceptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function exceptionHandler($exception)
105105
if (! is_cli())
106106
{
107107
$this->response->setStatusCode($statusCode);
108-
$header = "HTTP/{$this->request->getProtocolVersion()} {$this->response->getStatusCode()} {$this->response->getReason()}";
108+
$header = "HTTP/{$this->request->getProtocolVersion()} {$this->response->getStatusCode()} {$this->response->getReasonPhrase()}";
109109
header($header, true, $statusCode);
110110
if (strpos($this->rRequest->getHeaderLine('accept'), 'text/html') === false)
111111
{

src/ResponseBridge.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ public function __construct(
2828
}
2929

3030
private function getCi4ContentType(\CodeIgniter\HTTP\Response $ci4Response) : string{
31-
$ci4headers = $ci4Response->getHeaders();
32-
return $ci4headers['Content-Type']->getValueLine();
31+
return $ci4Response->getHeaderLine("Content-Type");
3332
}
3433

3534
private function getCi4Headers(\CodeIgniter\HTTP\Response $ci4Response) : array{
@@ -54,7 +53,7 @@ private function getCi4Headers(\CodeIgniter\HTTP\Response $ci4Response) : array{
5453
session_write_close();
5554
session_id(null);
5655
}
57-
$ci4headers = $ci4Response->getHeaders();
56+
$ci4headers = $ci4Response->headers();
5857
$headers = [];
5958
foreach ($ci4headers as $key => $value){
6059
if($key == "Content-Type") continue ;

test/.rr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ http:
44
command: "php psr-worker.php"
55
pool:
66
numWorkers: 1
7-
# maxJobs: 500
7+
# maxJobs: 50
88

99
static:
1010
enable: true

0 commit comments

Comments
 (0)