]> granicus.if.org Git - php/commitdiff
Evaluate constant in class scope
authorDmitry Stogov <dmitry@zend.com>
Mon, 22 Jul 2019 08:59:24 +0000 (11:59 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 22 Jul 2019 08:59:24 +0000 (11:59 +0300)
ext/reflection/php_reflection.c

index 79c2d3d92e78ba9870e145fcc5d9dfb2cf96a3f7..a2e38bf3f39e10428058ca3451f0e238876ee64e 100644 (file)
@@ -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;
                        }
                }