From 8fceeddfdc2d0872f50eefee3553febcf8fa99fc Mon Sep 17 00:00:00 2001 From: Dylan Marriott Date: Thu, 2 May 2024 08:57:15 +0100 Subject: [PATCH] Adding string cast on content length integer 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)); } }