Commit 1ee8dfd6fcf for php.net
commit 1ee8dfd6fcf02ce7cc3662381e4cfa76de47ec3b
Author: Niels Dossche <7771979+ndossche@users.noreply.github.com>
Date: Mon Nov 24 10:09:23 2025 -0800
Remove pointless EG(exception) checks when parsing coercive string argument (#20568)
The is_numeric_str_function() family cannot throw.
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 4a089526776..601d753bd2a 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;