summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-01-11 22:15:45 +0300
committerDmitry Stogov <dmitry@zend.com>2018-01-11 22:15:45 +0300
commit12c386f5b90387ce373e16cdf74fd4d3155d5aa7 (patch)
tree2103adb0a72abeba6cffd90b96e1ab8392747d1c /ext/reflection/php_reflection.c
parent0ec631c99676039f7056e939cfd34a7918c1246c (diff)
downloadphp-git-12c386f5b90387ce373e16cdf74fd4d3155d5aa7.tar.gz
Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573afdc7c336b3577ceabc9c65cafea17e8, now it should be OK).
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 458d5c2c06..6749003c46 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2218,7 +2218,7 @@ ZEND_METHOD(reflection_generator, getFunction)
if (ex->func->common.fn_flags & ZEND_ACC_CLOSURE) {
zval closure;
- ZVAL_OBJ(&closure, (zend_object *) ex->func->common.prototype);
+ ZVAL_OBJ(&closure, ZEND_CLOSURE_OBJECT(ex->func));
reflection_function_factory(ex->func, &closure, return_value);
} else if (ex->func->op_array.scope) {
reflection_method_factory(ex->func->op_array.scope, ex->func, NULL, return_value);