Skip to content

Commit 77b8ec1

Browse files
property_get_default(): update class constants
1 parent 033eec7 commit 77b8ec1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/reflection/php_reflection.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,10 @@ static zval *property_get_default(zend_property_info *prop_info) {
884884
ZVAL_DEINDIRECT(prop);
885885
return prop;
886886
} else {
887-
return &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)];
887+
if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) {
888+
return &EG(uninitialized_zval);
889+
}
890+
return &CE_DEFAULT_PROPERTIES_TABLE(ce)[OBJ_PROP_TO_NUM(prop_info->offset)];
888891
}
889892
}
890893

0 commit comments

Comments
 (0)