diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-10-03 10:48:42 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-10-03 10:48:42 +0200 |
commit | 945f315506538208705d370f39a6896371e48ebb (patch) | |
tree | 68d5867b636f000efc288a97826d2040f7ce32b1 /ext/reflection/php_reflection.c | |
parent | db80e0e2ad016cbff55cc6e1311b7ffe9ad7101e (diff) | |
download | php-git-945f315506538208705d370f39a6896371e48ebb.tar.gz |
Reflection: Copy invoke function also in the variadic case
It doesn't matter how the parameters are provided, we always have
to copy the trampoline invoke function.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index bd2d824c38..34082f04cd 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3332,13 +3332,11 @@ static void reflection_method_invoke(INTERNAL_FUNCTION_PARAMETERS, int variadic) fcc.called_scope = intern->ce; fcc.object = object ? Z_OBJ_P(object) : NULL; - if (!variadic) { - /* - * Copy the zend_function when calling via handler (e.g. Closure::__invoke()) - */ - if ((mptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) { - fcc.function_handler = _copy_function(mptr); - } + /* + * Copy the zend_function when calling via handler (e.g. Closure::__invoke()) + */ + if ((mptr->internal_function.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) { + fcc.function_handler = _copy_function(mptr); } result = zend_call_function(&fci, &fcc); |