Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
645d185
GH Actions: add actionlint job
jrfnl Jan 21, 2025
0a114e8
GH Actions: various script tweaks
jrfnl Jan 21, 2025
e72f336
Move shell scripts into dedicated directory
jrfnl Feb 11, 2025
11880e0
GH Actions: improve "don't run on forks" condition
jrfnl Aug 4, 2025
fb7f63c
README: add license badge
jrfnl Aug 4, 2025
b99bf08
GH Actions: update PHP ini configuration
jrfnl Aug 10, 2025
deb3323
PHP 8.5 | Tests: prevent deprecation notice for Reflection*::setAcces…
jrfnl Aug 10, 2025
70215bb
GH Actions: Bump actions/download-artifact from 4 to 5
dependabot[bot] Aug 11, 2025
b4f7881
Corrected URL of the Request Python library URL in README.md
pmbaldha Aug 22, 2025
23099fd
GH Actions: Bump actions/checkout from 4 to 5
dependabot[bot] Aug 25, 2025
f1128a1
PHP 8.5: Prevent deprecation notices for `curl_close`
TobiasBg Sep 1, 2025
a48a522
GH Actions: Bump actions/setup-python from 5 to 6
dependabot[bot] Sep 8, 2025
db59c38
Composer: update PHPUnit Polyfills
jrfnl Sep 20, 2025
5bb0c38
PHP 8.5 | Iri: fix two "Using null as an array offset" deprecation no…
jrfnl Sep 20, 2025
5e64a5e
PHP 8.5 | Response/Headers: fix a "Using null as an array offset" dep…
jrfnl Sep 20, 2025
3a9aeaf
PHP 8.5 | Utility/CaseInsensitiveDictionary: fix another set of "Usin…
jrfnl Sep 20, 2025
d343770
:lock_with_ink_pen: Update certificate bundle
github-actions[bot] Nov 4, 2025
79fdb01
Composer: remove roave/security-advisories
jrfnl Nov 13, 2025
f60e447
Fix tests for expired and revoked SSL certificates
schlessera Nov 20, 2025
dbe8503
PHP 8.5 | FilteredIterator: do not accept objects
jrfnl Nov 20, 2025
30ef85c
GH Actions: split "update-cacert" workflow
jrfnl Nov 14, 2025
b95a259
GH Actions: allow test runs to succeed on fork
jrfnl Nov 16, 2025
ab54364
GH Actions/test: use the latest Python version for mitmproxy
jrfnl Nov 16, 2025
4535e2a
GH Actions: "pin" all action runners
jrfnl Nov 20, 2025
1088c11
GH Actions: Bump actions/upload-artifact from 4.6.2 to 5.0.0
dependabot[bot] Nov 20, 2025
8415add
GH Actions: Bump actions/download-artifact from 5.0.0 to 6.0.0
dependabot[bot] Nov 20, 2025
7ff5d45
GH Actions: do not persist credentials
jrfnl Sep 20, 2025
e47bdad
GH Actions: update for the release of PHP 8.5
jrfnl Nov 19, 2025
04616f4
CurlTest::testDoesntOverwriteExpectHeaderIfManuallySet(): skip test o…
jrfnl Nov 21, 2025
366bbe7
GH Actions/quicktest: fix proxy cancelling
jrfnl Nov 21, 2025
f5539f6
Composer: prevent a lock file from being created
jrfnl Nov 21, 2025
ef1fb95
PHP 8.5 | CaseInsensitiveDictionary: final touches
jrfnl Nov 21, 2025
3dfeb42
CS: start using PHPCompatibility 10
jrfnl Nov 21, 2025
457dba4
Changelog for release 2.0.16
schlessera Nov 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PHP 8.5 | Utility/CaseInsensitiveDictionary: fix another set of "Usin…
…g null as an array offset" deprecation notices

Fixes deprecation notices which occur if `$offset` is `null`.

Fixed now via some extra defensive coding.

This change is already covered via the existing tests.

Ref: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_using_values_null_as_an_array_offset_and_when_calling_array_key_exists
  • Loading branch information
jrfnl committed Nov 21, 2025
commit 3a9aeaf05d6b887a1d48d322dc1084f148d3b1d8
16 changes: 16 additions & 0 deletions src/Utility/CaseInsensitiveDictionary.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public function offsetExists($offset) {
$offset = strtolower($offset);
}

if ($offset === null) {
$offset = '';
}

return isset($this->data[$offset]);
}

Expand All @@ -64,6 +68,10 @@ public function offsetGet($offset) {
$offset = strtolower($offset);
}

if ($offset === null) {
$offset = '';
}

if (!isset($this->data[$offset])) {
return null;
}
Expand All @@ -89,6 +97,10 @@ public function offsetSet($offset, $value) {
$offset = strtolower($offset);
}

if ($offset === null) {
$offset = '';
}

$this->data[$offset] = $value;
}

Expand All @@ -103,6 +115,10 @@ public function offsetUnset($offset) {
$offset = strtolower($offset);
}

if ($offset === null) {
$offset = '';
}

unset($this->data[$offset]);
}

Expand Down