mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix missing handling of CALLABLE_CONVERT in cleanup_unfinished_calls()
This commit is contained in:
commit
8160869e3d
24
Zend/tests/gh14003.phpt
Normal file
24
Zend/tests/gh14003.phpt
Normal file
@ -0,0 +1,24 @@
|
||||
--TEST--
|
||||
GH-14003: Missing handling of CALLABLE_CONVERT in cleanup_unfinished_calls()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function foo(string $key): string {
|
||||
throw new \Exception('Test');
|
||||
}
|
||||
|
||||
array_filter(
|
||||
array_combine(
|
||||
['a'],
|
||||
array_map(foo(...), ['a']),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Exception: Test in %s:%d
|
||||
Stack trace:
|
||||
#0 [internal function]: foo('a')
|
||||
#1 %s(%d): array_map(Object(Closure), Array)
|
||||
#2 {main}
|
||||
thrown in %s on line %d
|
@ -4233,6 +4233,7 @@ ZEND_API void zend_unfinished_calls_gc(zend_execute_data *execute_data, zend_exe
|
||||
case ZEND_DO_ICALL:
|
||||
case ZEND_DO_UCALL:
|
||||
case ZEND_DO_FCALL_BY_NAME:
|
||||
case ZEND_CALLABLE_CONVERT:
|
||||
level++;
|
||||
break;
|
||||
case ZEND_INIT_FCALL:
|
||||
@ -4288,6 +4289,7 @@ ZEND_API void zend_unfinished_calls_gc(zend_execute_data *execute_data, zend_exe
|
||||
case ZEND_DO_ICALL:
|
||||
case ZEND_DO_UCALL:
|
||||
case ZEND_DO_FCALL_BY_NAME:
|
||||
case ZEND_CALLABLE_CONVERT:
|
||||
level++;
|
||||
break;
|
||||
case ZEND_INIT_FCALL:
|
||||
@ -4366,6 +4368,7 @@ static void cleanup_unfinished_calls(zend_execute_data *execute_data, uint32_t o
|
||||
case ZEND_DO_ICALL:
|
||||
case ZEND_DO_UCALL:
|
||||
case ZEND_DO_FCALL_BY_NAME:
|
||||
case ZEND_CALLABLE_CONVERT:
|
||||
level++;
|
||||
break;
|
||||
case ZEND_INIT_FCALL:
|
||||
@ -4421,6 +4424,7 @@ static void cleanup_unfinished_calls(zend_execute_data *execute_data, uint32_t o
|
||||
case ZEND_DO_ICALL:
|
||||
case ZEND_DO_UCALL:
|
||||
case ZEND_DO_FCALL_BY_NAME:
|
||||
case ZEND_CALLABLE_CONVERT:
|
||||
level++;
|
||||
break;
|
||||
case ZEND_INIT_FCALL:
|
||||
|
Loading…
Reference in New Issue
Block a user