Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Utility\CaseInsensitiveDictionary: minor bug fix
The use of `strtolower()` on non-string keys, is 1) not necessary and 2) had side-effects when non-string keys were used as those were then cast to string, which with the current set of tests would lead to the `false` test case overwritting the `null` test case and potentially "passing null to non-nullable" errors in PHP 8.1. While this class is intended to be used with requests headers, the class in itself is not limited to this use-case, so should function as per the specifications, independently of the use-case. Alternatively, a stricter check could be put in place to only allow string keys for the data captured in this class. That would potentially create a bigger breaking change though.
- Loading branch information