diff --git a/Zend/tests/call_user_func_strict_arginfo_check.phpt b/Zend/tests/call_user_func_strict_arginfo_check.phpt new file mode 100644 index 00000000000..1f21ee989dd --- /dev/null +++ b/Zend/tests/call_user_func_strict_arginfo_check.phpt @@ -0,0 +1,14 @@ +--TEST-- +Arginfo / zpp consistency check for call_user_func() in strict context +--FILE-- + +--EXPECT-- +int(0) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index ed8fc2cef32..f475aa164a5 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -886,12 +886,12 @@ cleanup_args: EG(jit_trace_num) = orig_jit_trace_num; } else { ZEND_ASSERT(func->type == ZEND_INTERNAL_FUNCTION); -#if ZEND_DEBUG - bool should_throw = zend_internal_call_should_throw(func, call); -#endif ZVAL_NULL(fci->retval); call->prev_execute_data = EG(current_execute_data); EG(current_execute_data) = call; +#if ZEND_DEBUG + bool should_throw = zend_internal_call_should_throw(func, call); +#endif if (EXPECTED(zend_execute_internal == NULL)) { /* saves one function call if zend_execute_internal is not used */ func->internal_function.handler(call, fci->retval);