Skip to content

Commit b9474bf

Browse files
rioderelftebwoebi
authored andcommitted
Don’t report arginfo violations on fake closures (#9823)
1 parent 56c121c commit b9474bf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.2.0RC6
44

5+
- Core:
6+
. Fixed bug GH-9823 (Don’t reset func in zend_closure_internal_handler).
7+
(Florian Sowade)
8+
59
- PDO:
610
. Fixed bug GH-9818 (Initialize run time cache in PDO methods).
711
(Florian Sowade)

Zend/zend_execute.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,8 +1210,8 @@ static zend_never_inline ZEND_ATTRIBUTE_UNUSED bool zend_verify_internal_arg_typ
12101210
* trust that arginfo matches what is enforced by zend_parse_parameters. */
12111211
ZEND_API bool zend_internal_call_should_throw(zend_function *fbc, zend_execute_data *call)
12121212
{
1213-
if (fbc->internal_function.handler == ZEND_FN(pass)) {
1214-
/* Be lenient about the special pass function. */
1213+
if (fbc->internal_function.handler == ZEND_FN(pass) || (fbc->internal_function.fn_flags | ZEND_ACC_FAKE_CLOSURE)) {
1214+
/* Be lenient about the special pass function and about fake closures. */
12151215
return 0;
12161216
}
12171217

0 commit comments

Comments
 (0)