Skip to content

Commit bba7f38

Browse files
committed
Don't explicitly set return value on ZPP failure in ext/iconv
Failing ZPP throws as of PHP 8.0.0, so explicitly setting a return value is useless, and also slightly confusing.
1 parent d420336 commit bba7f38

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/iconv/iconv.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,7 +2004,7 @@ PHP_FUNCTION(iconv_strlen)
20042004

20052005
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|s",
20062006
&str, &charset, &charset_len) == FAILURE) {
2007-
RETURN_FALSE;
2007+
return;
20082008
}
20092009

20102010
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2038,7 +2038,7 @@ PHP_FUNCTION(iconv_substr)
20382038
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sl|ls",
20392039
&str, &offset, &length,
20402040
&charset, &charset_len) == FAILURE) {
2041-
RETURN_FALSE;
2041+
return;
20422042
}
20432043

20442044
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2078,7 +2078,7 @@ PHP_FUNCTION(iconv_strpos)
20782078
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|ls",
20792079
&haystk, &ndl,
20802080
&offset, &charset, &charset_len) == FAILURE) {
2081-
RETURN_FALSE;
2081+
return;
20822082
}
20832083

20842084
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2132,7 +2132,7 @@ PHP_FUNCTION(iconv_strrpos)
21322132
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS|s",
21332133
&haystk, &ndl,
21342134
&charset, &charset_len) == FAILURE) {
2135-
RETURN_FALSE;
2135+
return;
21362136
}
21372137

21382138
if (ZSTR_LEN(ndl) < 1) {
@@ -2177,7 +2177,7 @@ PHP_FUNCTION(iconv_mime_encode)
21772177
&field_name, &field_value,
21782178
&pref) == FAILURE) {
21792179

2180-
RETURN_FALSE;
2180+
return;
21812181
}
21822182

21832183
if (pref != NULL) {
@@ -2275,7 +2275,7 @@ PHP_FUNCTION(iconv_mime_decode)
22752275
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ls",
22762276
&encoded_str, &mode, &charset, &charset_len) == FAILURE) {
22772277

2278-
RETURN_FALSE;
2278+
return;
22792279
}
22802280

22812281
if (charset_len >= ICONV_CSNMAXLEN) {
@@ -2315,7 +2315,7 @@ PHP_FUNCTION(iconv_mime_decode_headers)
23152315
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|ls",
23162316
&encoded_str, &mode, &charset, &charset_len) == FAILURE) {
23172317

2318-
RETURN_FALSE;
2318+
return;
23192319
}
23202320

23212321
if (charset_len >= ICONV_CSNMAXLEN) {

0 commit comments

Comments
 (0)