From 781e1573afdc7c336b3577ceabc9c65cafea17e8 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 11 Jan 2018 16:25:28 +0300 Subject: Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. --- ext/reflection/php_reflection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/reflection/php_reflection.c') 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); -- cgit v1.2.1