Skip to content

Commit 49c1cdb

Browse files
committed
Fix zend guard property initialization
1 parent 3a33711 commit 49c1cdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_objects.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ static zend_always_inline void _zend_object_std_init(zend_object *object, zend_c
3535
object->properties = NULL;
3636
zend_objects_store_put(object);
3737
if (UNEXPECTED(ce->ce_flags & ZEND_ACC_USE_GUARDS)) {
38-
ZVAL_UNDEF(object->properties_table + object->ce->default_properties_count);
38+
zval *guard_value = object->properties_table + object->ce->default_properties_count;
39+
ZVAL_UNDEF(guard_value);
40+
Z_GUARD_P(guard_value) = 0;
3941
}
4042
}
4143

0 commit comments

Comments
 (0)