Skip to content

Commit 82a6cb1

Browse files
committed
Fix cloning
1 parent 11d11dc commit 82a6cb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ ZEND_API void ZEND_FASTCALL zend_objects_clone_members(zend_object *new_object,
268268

269269
for (uint32_t i = 0; i < new_object->ce->default_properties_count; i++) {
270270
zend_property_info *prop_info = new_object->ce->properties_info_table[i];
271-
if (prop_info && (prop_info->flags & (~ZEND_ACC_STATIC|ZEND_ACC_READONLY)) && ZEND_TYPE_IS_SET(prop_info->type)) {
271+
if (prop_info && !(prop_info->flags & ZEND_ACC_STATIC) && (prop_info->flags & ZEND_ACC_READONLY)) {
272272
zval *prop = OBJ_PROP_NUM(new_object, i);
273273
Z_PROP_FLAG_P(prop) &= ~IS_PROP_REINITABLE;
274274
}

0 commit comments

Comments
 (0)