Commit 9acaa92
committed
Route writes on lazy objects through zend_update_property_ex()
Per @arnaudlb's review: a lazy ghost has its backing slots uninitialized
until the realization hook fires. Writing directly via OBJ_PROP / slot
manipulation on such an object would bypass that hook and leave it in a
half-initialized state (lazy counters out of sync, lazy-init callback
never called).
At the top of dc_write_backed_property(), check
zend_lazy_object_initialized() and, in the default mode, delegate to
the engine's property write path which handles realization. The
DEEPCLONE_HYDRATE_NO_LAZY_INIT flag keeps its existing opt-out fast
path (skips lazy-init intentionally via Reflection).1 parent 8278442 commit 9acaa92
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
735 | 744 | | |
736 | 745 | | |
737 | 746 | | |
| |||
0 commit comments