Skip to content

Commit a86755f

Browse files
committed
Fix missing properties_info_table for internal classes
1 parent 5159ae7 commit a86755f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_API.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4573,6 +4573,11 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
45734573
zval *property_default_ptr = &ce->default_properties_table[OBJ_PROP_TO_NUM(property_info->offset)];
45744574
ZVAL_UNDEF(property_default_ptr);
45754575
Z_PROP_FLAG_P(property_default_ptr) = IS_PROP_UNINIT;
4576+
/* For user classes this is handled during linking */
4577+
if (ce->type == ZEND_INTERNAL_CLASS) {
4578+
ce->properties_info_table = perealloc(ce->properties_info_table, sizeof(zend_property_info *) * ce->default_properties_count, 1);
4579+
ce->properties_info_table[ce->default_properties_count - 1] = property_info;
4580+
}
45764581
goto skip_property_storage;
45774582
}
45784583
}

0 commit comments

Comments
 (0)