Skip to content

Commit

Permalink
property_get_default(): update class constants
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielEScherzer committed Oct 21, 2024
1 parent 033eec7 commit 77b8ec1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/reflection/php_reflection.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,10 @@ static zval *property_get_default(zend_property_info *prop_info) {
ZVAL_DEINDIRECT(prop);
return prop;
} else {
return &ce->default_properties_table[OBJ_PROP_TO_NUM(prop_info->offset)];
if (UNEXPECTED(zend_update_class_constants(ce) != SUCCESS)) {
return &EG(uninitialized_zval);
}
return &CE_DEFAULT_PROPERTIES_TABLE(ce)[OBJ_PROP_TO_NUM(prop_info->offset)];
}
}

Expand Down

0 comments on commit 77b8ec1

Please sign in to comment.