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

Commit a0aa733

Browse files
michalbundyraweierophinney
authored andcommitted
Replace strtr to str_replace - clarifies intention, improves maintainability
1 parent 22f86ae commit a0aa733

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/functions/marshal_headers_from_sapi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function marshalHeadersFromSapi(array $server) : array
4545
}
4646

4747
if (strpos($key, 'HTTP_') === 0) {
48-
$name = strtr(strtolower(substr($key, 5)), '_', '-');
48+
$name = str_replace('_', '-', strtolower(substr($key, 5)));
4949
$headers[$name] = $value;
5050
continue;
5151
}

0 commit comments

Comments
 (0)