Commit 55aa4ec
committed
Route dynamic-property fallback through zend_update_property_ex()
Per @arnaudlb's review: zend_std_write_property() skips the object's
write_property handler. For internal classes (or user objects that
swap handlers at create_object time), that can bypass semantic
validation the class expects on property writes.
Switch to zend_update_property_ex(scope_ce ?: obj_ce, obj, name, value)
which dispatches through the handler, keeping compatibility with
overridden write paths. Scope falls back to obj_ce when scope_ce is
NULL (stdClass-scoped dynamic prop on a user class).1 parent 37a5aa3 commit 55aa4ec
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3346 | 3346 | | |
3347 | 3347 | | |
3348 | 3348 | | |
3349 | | - | |
3350 | | - | |
3351 | | - | |
3352 | | - | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
| 3355 | + | |
3353 | 3356 | | |
3354 | 3357 | | |
3355 | 3358 | | |
| |||
0 commit comments