From 99f3f7bb2f15949db92990b3c9b889c544a88ad3 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+ndossche@users.noreply.github.com> Date: Sun, 23 Nov 2025 14:15:58 +0100 Subject: [PATCH] Remove pointless EG(exception) checks when parsing coercive string argument The is_numeric_str_function() family cannot throw. --- Zend/zend_API.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 4a08952677627..601d753bd2aa6 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -592,9 +592,6 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_long_weak(const zval *arg, zend_long return 0; } } - if (UNEXPECTED(EG(exception))) { - return 0; - } } else if (EXPECTED(Z_TYPE_P(arg) < IS_TRUE)) { if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("int", arg_num)) { return 0; @@ -641,9 +638,6 @@ ZEND_API bool ZEND_FASTCALL zend_parse_arg_double_weak(const zval *arg, double * return 0; } } - if (UNEXPECTED(EG(exception))) { - return 0; - } } else if (EXPECTED(Z_TYPE_P(arg) < IS_TRUE)) { if (UNEXPECTED(Z_TYPE_P(arg) == IS_NULL) && !zend_null_arg_deprecated("float", arg_num)) { return 0;