summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c10
1 files changed, 10 insertions, 0 deletions
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++) {