From 25260eab783a528e96ee7956b556934c0eb40365 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 22 Jan 2023 21:51:52 +0100 Subject: [PATCH] Fix incorrect check in zend_internal_call_should_throw() This debug code is part of arginfo validation. This validation will never trigger properly because the OR operation makes the first if always true. Fix it by changing to an AND. --- Zend/zend_execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index de32aab8af94b..14d52e70be8e5 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1210,7 +1210,7 @@ static zend_never_inline ZEND_ATTRIBUTE_UNUSED bool zend_verify_internal_arg_typ * trust that arginfo matches what is enforced by zend_parse_parameters. */ ZEND_API bool zend_internal_call_should_throw(zend_function *fbc, zend_execute_data *call) { - if (fbc->internal_function.handler == ZEND_FN(pass) || (fbc->internal_function.fn_flags | ZEND_ACC_FAKE_CLOSURE)) { + if (fbc->internal_function.handler == ZEND_FN(pass) || (fbc->internal_function.fn_flags & ZEND_ACC_FAKE_CLOSURE)) { /* Be lenient about the special pass function and about fake closures. */ return 0; }