Skip to content

Commit 4a52364

Browse files
committed
Fix no dynamic prop warning + typed prop
1 parent a56e512 commit 4a52364

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ext/spl/spl_array.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,13 @@ static void spl_array_write_dimension_ex(int check_inherited, zend_object *objec
513513
ht = spl_array_get_hash_table(intern);
514514
refcount = spl_array_set_refcount(intern->is_child, ht, 1);
515515
if (key.key) {
516-
zend_hash_update_ind(ht, key.key, value);
516+
if (spl_array_is_object(intern)) {
517+
ZEND_ASSERT(Z_TYPE(intern->array) == IS_OBJECT);
518+
zend_object *obj = Z_OBJ(intern->array);
519+
obj->handlers->write_property(obj, key.key, value, NULL);
520+
} else {
521+
zend_hash_update_ind(ht, key.key, value);
522+
}
517523
spl_hash_key_release(&key);
518524
} else {
519525
ZEND_ASSERT(!spl_array_is_object(intern));

0 commit comments

Comments
 (0)