Commit ac8d0e5
committed
Prevent unexpected array entry conversion when reading key
When passing an array, the key entry can get converted to a string if it
is an object, but this actually modifies the original array entry.
The test originally outputted:
```
array(2) {
[0]=>
string(...) => ...
[1]=>
string(0) ""
}
```
This is unexpected. Use zval_try_get_string() to prevent this behaviour.
Closes GH-16693.1 parent 065bde1 commit ac8d0e5
File tree
3 files changed
+42
-6
lines changed- ext/openssl
- tests
3 files changed
+42
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3577 | 3577 | | |
3578 | 3578 | | |
3579 | 3579 | | |
3580 | | - | |
| 3580 | + | |
| 3581 | + | |
3581 | 3582 | | |
3582 | 3583 | | |
3583 | 3584 | | |
3584 | | - | |
3585 | | - | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
3586 | 3588 | | |
3587 | 3589 | | |
3588 | 3590 | | |
3589 | 3591 | | |
3590 | 3592 | | |
3591 | 3593 | | |
3592 | | - | |
| 3594 | + | |
3593 | 3595 | | |
3594 | 3596 | | |
3595 | 3597 | | |
| |||
3599 | 3601 | | |
3600 | 3602 | | |
3601 | 3603 | | |
3602 | | - | |
| 3604 | + | |
3603 | 3605 | | |
3604 | 3606 | | |
3605 | 3607 | | |
| 3608 | + | |
3606 | 3609 | | |
3607 | 3610 | | |
3608 | 3611 | | |
| |||
3615 | 3618 | | |
3616 | 3619 | | |
3617 | 3620 | | |
3618 | | - | |
| 3621 | + | |
3619 | 3622 | | |
3620 | 3623 | | |
3621 | 3624 | | |
| 3625 | + | |
3622 | 3626 | | |
3623 | 3627 | | |
3624 | 3628 | | |
| |||
3631 | 3635 | | |
3632 | 3636 | | |
3633 | 3637 | | |
| 3638 | + | |
| 3639 | + | |
3634 | 3640 | | |
3635 | 3641 | | |
3636 | 3642 | | |
| |||
Lines changed: 27 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 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments