Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 22f86ae

Browse files
michalbundyraweierophinney
authored andcommitted
Skip earlier if value is an empty string
1 parent d67e256 commit 22f86ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/functions/marshal_headers_from_sapi.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ function marshalHeadersFromSapi(array $server) : array
2828
continue;
2929
}
3030

31+
if ($value === '') {
32+
continue;
33+
}
34+
3135
// Apache prefixes environment variables with REDIRECT_
3236
// if they are added by rewrite rules
3337
if (strpos($key, 'REDIRECT_') === 0) {
@@ -40,10 +44,6 @@ function marshalHeadersFromSapi(array $server) : array
4044
}
4145
}
4246

43-
if ($value === '') {
44-
continue;
45-
}
46-
4747
if (strpos($key, 'HTTP_') === 0) {
4848
$name = strtr(strtolower(substr($key, 5)), '_', '-');
4949
$headers[$name] = $value;

0 commit comments

Comments
 (0)