History log of /php-src/Zend/zend_property_hooks.c (Results 1 – 8 of 8)
Revision Date Author Comments
# d76ef137 03-Oct-2024 Ilija Tovilo

Fix various hooked object iterator issues

Fixes GH-16185
Closes GH-16281


# c9dfb774 03-Oct-2024 Arnaud Le Blanc

Deny resetting an object as lazy during property iteration

Supporting object reset while its properties are being iterated would increase
complexity for little benefit. Furthermore it ma

Deny resetting an object as lazy during property iteration

Supporting object reset while its properties are being iterated would increase
complexity for little benefit. Furthermore it may not be possible to ensure a
consistent behavior between ghosts and proxies (wrt to iteration position).

Iteration is detected by checking if the object's properties ht has iterators.
This requires refactoring the hooked get_iterator() implementation to ensure
that it creates a properties ht iterator immediately.

Closes GH-15960

show more ...


# 4d7fcea5 03-Oct-2024 Arnaud Le Blanc

Fix handling of undef property during foreach by ref on hooked class


# 17d46bb3 17-Sep-2024 Arnaud Le Blanc

Fix oss-fuzz #71382 (#15854)

The return value of zho_build_properties_ex() is passed to ZVAL_ARR(), which sets the IS_TYPE_REFCOUNTED flag. Returning &zend_emtpy_array will crash later when

Fix oss-fuzz #71382 (#15854)

The return value of zho_build_properties_ex() is passed to ZVAL_ARR(), which sets the IS_TYPE_REFCOUNTED flag. Returning &zend_emtpy_array will crash later when trying to dtor the zval.

I'm fixing this by returning zend_new_array(0) instead of &zend_empty_array.

An alternative was to make ZVAL_ARR() aware of immutable arrays, like ZVAL_STR() is with interned strings, but I found no other problematic cases.

show more ...


# 58aa6fc8 19-May-2023 Arnaud Le Blanc

Lazy objects

RFC: https://wiki.php.net/rfc/lazy-objects

Closes GH-15019


# 327588ab 20-Aug-2024 Ilija Tovilo

Replace OBJ_PROP_PTR_TO_NUM() with zend_get_property_info_for_slot()

I wasn't aware such a function already existed.


# 60f87f29 19-Aug-2024 Ilija Tovilo

Fix various hooked object iterator issues (GH-15394)

Fixes GH-15187


# 780a8280 14-Jul-2024 Ilija Tovilo

[RFC] Property hooks (#13455)

RFC: https://wiki.php.net/rfc/property-hooks

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>