Commit 15a85d8
Add test for non-empty string-key array to guard initializedEmpty condition
This test would fail on PHP 8.0-8.2 if initializedEmpty was set
unconditionally in createFromConstantArray. With only string keys,
max(nextAutoIndexes) is 0 but there are no negative int keys, so
initializedEmpty should stay false, allowing negative keys to update
the auto-index.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 94e9657 commit 15a85d8
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments