summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-10-02 18:20:30 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-10-02 18:20:30 +0200
commit784579d99aad02587aefd05dc210348b3c1e7a89 (patch)
tree21a76d29c59aa34476a80c8ba3918d4d12056baf /ext/reflection/php_reflection.c
parentc8188fdd3ba9632bd8f820024297f4cb1fdf867d (diff)
parenta42801abe3542be7fcb6ce46d1533e4cd4e5c612 (diff)
downloadphp-git-784579d99aad02587aefd05dc210348b3c1e7a89.tar.gz
Merge branch 'PHP-7.3'
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 14cde3de05..3562641544 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1849,6 +1849,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) {
@@ -1907,6 +1912,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++) {