From f0647edd88ca2a2d4e15b4019a3694ef1dbe33f9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 2 Oct 2018 18:19:53 +0200 Subject: Fixed bug #66430 --- ext/reflection/php_reflection.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ext/reflection/php_reflection.c') diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 3bd31e48a8..03ae873aa2 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1897,6 +1897,11 @@ ZEND_METHOD(reflection_function, invoke) fcc.called_scope = NULL; fcc.object = NULL; + if (!Z_ISUNDEF(intern->obj)) { + Z_OBJ_HT(intern->obj)->get_closure( + &intern->obj, &fcc.called_scope, &fcc.function_handler, &fcc.object); + } + result = zend_call_function(&fci, &fcc); if (result == FAILURE) { @@ -1958,6 +1963,11 @@ ZEND_METHOD(reflection_function, invokeArgs) fcc.called_scope = NULL; fcc.object = NULL; + if (!Z_ISUNDEF(intern->obj)) { + Z_OBJ_HT(intern->obj)->get_closure( + &intern->obj, &fcc.called_scope, &fcc.function_handler, &fcc.object); + } + result = zend_call_function(&fci, &fcc); for (i = 0; i < argc; i++) { -- cgit v1.2.1