Skip to content

Commit

Permalink
Force cast headers key to string
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts authored Sep 11, 2021
1 parent 62f9784 commit 5ad9b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PSR7Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected function configureServer(Request $request): array

$server['HTTP_USER_AGENT'] = '';
foreach ($request->headers as $key => $value) {
$key = \strtoupper(\str_replace('-', '_', $key));
$key = \strtoupper(\str_replace('-', '_', (string)$key));
if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) {
$server[$key] = \implode(', ', $value);
} else {
Expand Down

0 comments on commit 5ad9b26

Please sign in to comment.