From 60de74ebdae5cf8b14f85d6e60f519c9e8b966f9 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 15 Aug 2016 23:22:55 +0800 Subject: Fixed bug #72846 (getConstant for a array constant with constant values returns NULL/NFC/UKNOWN) --- ext/reflection/php_reflection.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/reflection/php_reflection.c') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 964e7a9e57..08acc7e5d2 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4407,6 +4407,7 @@ ZEND_METHOD(reflection_class, getConstants) GET_REFLECTION_OBJECT_PTR(ce); array_init(return_value); ZEND_HASH_FOREACH_VAL(&ce->constants_table, val) { + ZVAL_DEREF(val); if (UNEXPECTED(zval_update_constant_ex(val, 1, ce) != SUCCESS)) { return; } @@ -4431,6 +4432,7 @@ ZEND_METHOD(reflection_class, getConstant) GET_REFLECTION_OBJECT_PTR(ce); ZEND_HASH_FOREACH_VAL(&ce->constants_table, value) { + ZVAL_DEREF(value); if (UNEXPECTED(zval_update_constant_ex(value, 1, ce) != SUCCESS)) { return; } -- cgit v1.2.1