diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-01-11 16:25:28 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-01-11 16:25:28 +0300 |
commit | 781e1573afdc7c336b3577ceabc9c65cafea17e8 (patch) | |
tree | b9738020d342fac1c28b2517687008947117e19d /ext/reflection/php_reflection.c | |
parent | 35e70af2085300418cab4a801730dbeb05d5d222 (diff) | |
download | php-git-781e1573afdc7c336b3577ceabc9c65cafea17e8.tar.gz |
Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 2 |
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); |