From: Dmitry Stogov Date: Mon, 22 Jul 2019 08:59:24 +0000 (+0300) Subject: Evaluate constant in class scope X-Git-Tag: php-7.4.0beta1~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f51764e5d91da11d47a99ba444cd00185298e23;p=php Evaluate constant in class scope --- diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 79c2d3d92e..a2e38bf3f3 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3738,7 +3738,7 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value /* this is necessary to make it able to work with default array * properties, returned to user */ if (Z_TYPE(prop_copy) == IS_CONSTANT_AST) { - if (UNEXPECTED(zval_update_constant_ex(&prop_copy, NULL) != SUCCESS)) { + if (UNEXPECTED(zval_update_constant_ex(&prop_copy, ce) != SUCCESS)) { return; } }