Commit 56b2b9f
committed
Fix GH-21687: assertion failure in zend_enum_fetch_case_name after array_walk
array_walk() wraps object properties in IS_REFERENCE when passing
them to the callback. For enum objects, this converts the name
property from IS_STRING to IS_REFERENCE in-place. A subsequent
var_dump() calls zend_enum_fetch_case_name() which asserts IS_STRING
on the property, triggering an assertion failure.
Dereference through IS_REFERENCE in both zend_enum_fetch_case_name()
and zend_enum_fetch_case_value() before accessing the value.
Closes GH-216871 parent dc7f6a8 commit 56b2b9f
2 files changed
Lines changed: 23 additions & 1 deletion
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
0 commit comments