Skip to content

Commit

Permalink
Adding string cast on content length integer (#181)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Fludem authored May 2, 2024
1 parent 177a720 commit 78056b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Servers/Reverb/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit 78056b1

Please sign in to comment.