PHP Fatal error: Uncaught TypeError: strtolower(): Argument #1 ($string) must be of type string, int given in /.../vendor/guzzlehttp/psr7/src/Message.php:36
Possible Solution
if (strtolower((string)$name) === 'set-cookie') {
instead of
if (strtolower($name) === 'set-cookie') {
in Message.php
Additional context
I'm not sure if numeric headers are valid in HTTP, but even if they are not, the exception should not be generic PHP type error
The header itself becomes numeric instead of string here:
PHP version: PHP 8.2.6 (cli)
Description When calling \GuzzleHttp\Psr7\Message::toString on the payload with numeric header it throws an error instead of providing the result
How to reproduce
will produce exception
Possible Solution
instead of
in
Message.php
Additional context I'm not sure if numeric headers are valid in HTTP, but even if they are not, the exception should not be generic PHP type error The header itself becomes numeric instead of string here:
\GuzzleHttp\Utils::headersFromLines
because of the way PHP works,
$arr["0"] = 'asdf';
will be cast to integer array key.