Commit 2335e9e
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.1 parent 90aac52 commit 2335e9e
File tree
2 files changed
+39
-6
lines changed- ext/openssl
- tests
2 files changed
+39
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3571 | 3571 | | |
3572 | 3572 | | |
3573 | 3573 | | |
3574 | | - | |
| 3574 | + | |
| 3575 | + | |
3575 | 3576 | | |
3576 | 3577 | | |
3577 | 3578 | | |
3578 | | - | |
3579 | | - | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
3580 | 3582 | | |
3581 | 3583 | | |
3582 | 3584 | | |
3583 | 3585 | | |
3584 | 3586 | | |
3585 | 3587 | | |
3586 | | - | |
| 3588 | + | |
3587 | 3589 | | |
3588 | 3590 | | |
3589 | 3591 | | |
| |||
3593 | 3595 | | |
3594 | 3596 | | |
3595 | 3597 | | |
3596 | | - | |
| 3598 | + | |
3597 | 3599 | | |
3598 | 3600 | | |
3599 | 3601 | | |
| 3602 | + | |
3600 | 3603 | | |
3601 | 3604 | | |
3602 | 3605 | | |
| |||
3609 | 3612 | | |
3610 | 3613 | | |
3611 | 3614 | | |
3612 | | - | |
| 3615 | + | |
3613 | 3616 | | |
3614 | 3617 | | |
3615 | 3618 | | |
| 3619 | + | |
3616 | 3620 | | |
3617 | 3621 | | |
3618 | 3622 | | |
| |||
3625 | 3629 | | |
3626 | 3630 | | |
3627 | 3631 | | |
| 3632 | + | |
| 3633 | + | |
3628 | 3634 | | |
3629 | 3635 | | |
3630 | 3636 | | |
| |||
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