Skip to content

Commit

Permalink
Merge pull request #158 from Xerkus/hotifx/numeric-headers-docs
Browse files Browse the repository at this point in the history
Fix docs referring to array key as value
  • Loading branch information
Ocramius committed Aug 1, 2023
2 parents 283cdc5 + 60d4d8c commit 860660e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/book/v3/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RFC-7230 defines an ABNF pattern for header field names that allows the possibil
```

The PSR-7, `Psr\Http\MessageInterface::getHeaders()` method requires implementations to return an associative array, where the key is the header field name.
This triggers an interesting quirk in PHP: when adding a value to an array using a string that consists of an integer value, PHP will convert this value to an integer (see [PHP bug 80309](https://bugs.php.net/bug.php?id=80309) for more details).
This triggers an interesting quirk in PHP: when adding an element to an array with a string key that consists of an integer value, PHP will convert this key to an integer (see [PHP bug 80309](https://bugs.php.net/bug.php?id=80309) for more details).
This presents several issues:

- First, it means that consumers cannot depend on the header field name returned being a string.
Expand Down

0 comments on commit 860660e

Please sign in to comment.