summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-10-02 18:19:53 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-10-02 18:19:53 +0200
commitf0647edd88ca2a2d4e15b4019a3694ef1dbe33f9 (patch)
tree09ba2154e490506b959fd0abeac8d8c3103b3b82 /ext/reflection/php_reflection.c
parentd2477b284b73adb12fb9694d144855a468fe8825 (diff)
downloadphp-git-f0647edd88ca2a2d4e15b4019a3694ef1dbe33f9.tar.gz
Fixed bug #66430
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++) {