diff --git a/src/http-message/src/Concern/MessageTrait.php b/src/http-message/src/Concern/MessageTrait.php index b7ad61129..66b403fd9 100644 --- a/src/http-message/src/Concern/MessageTrait.php +++ b/src/http-message/src/Concern/MessageTrait.php @@ -389,7 +389,7 @@ protected function setHeaders(array $headers): self protected function initializeHeaders(array $headers): void { foreach ($headers as $name => $value) { - $name = strtolower($name); + $name = strtolower((string)$name); $this->headers[$name] = [$value]; $this->headerNames[$name] = $name;