diff options
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index c2f6e198ad..db2da7209d 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -1862,6 +1862,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) { @@ -1920,6 +1925,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++) { |