Commit 6ab5038
authored
Make array_pad's $length warning less confusing (#10149)
Remove array_pad's arbitrary length restriction
The error message was wrong; it *is* possible to use a larger length.
Furthermore, there is an arbitrary restriction on the new array's
length.
Fix both by checking the length against HT_MAX_SIZE.1 parent 690db97 commit 6ab5038
File tree
3 files changed
+25
-11
lines changed- ext/standard
- tests/array
3 files changed
+25
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4344 | 4344 | | |
4345 | 4345 | | |
4346 | 4346 | | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
4347 | 4352 | | |
4348 | 4353 | | |
4349 | 4354 | | |
4350 | | - | |
4351 | | - | |
4352 | | - | |
4353 | | - | |
4354 | 4355 | | |
4355 | 4356 | | |
4356 | 4357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 16 | | |
23 | 17 | | |
24 | 18 | | |
| |||
84 | 78 | | |
85 | 79 | | |
86 | 80 | | |
87 | | - | |
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments