mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix arginfo/zpp consistency check for call_user_func from strict_types scope
This was using the wrong strict_types information. In this case the call is performed with strict_types=0.
This commit is contained in:
14
Zend/tests/call_user_func_strict_arginfo_check.phpt
Normal file
14
Zend/tests/call_user_func_strict_arginfo_check.phpt
Normal file
@@ -0,0 +1,14 @@
|
||||
--TEST--
|
||||
Arginfo / zpp consistency check for call_user_func() in strict context
|
||||
--FILE--
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Foo;
|
||||
|
||||
// strlen() will be called with strict_types=0, so this is legal.
|
||||
var_dump(call_user_func('strlen', false));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(0)
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user