From 78056b18086a5dcd0c50db8398e9be313e22624b Mon Sep 17 00:00:00 2001 From: Dylan Marriott Date: Thu, 2 May 2024 15:46:35 +0100 Subject: [PATCH] Adding string cast on content length integer (#181) The header function inside the JsonResponse class expects array|null|string and previously we were passing an integer. Now casting integer to string. Pedantic change. --- src/Servers/Reverb/Http/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Servers/Reverb/Http/Response.php b/src/Servers/Reverb/Http/Response.php index dd2c8db4..85858cb4 100644 --- a/src/Servers/Reverb/Http/Response.php +++ b/src/Servers/Reverb/Http/Response.php @@ -13,6 +13,6 @@ public function __construct(mixed $data = null, int $status = 200, array $header { parent::__construct($data, $status, $headers, $json); - $this->headers->set('Content-Length', strlen($this->content)); + $this->headers->set('Content-Length', (string) strlen($this->content)); } }