Skip to content

Commit 48892e6

Browse files
committed
Remove unused parameter
Cf. <https://bugs.php.net/78579>.
1 parent 8293667 commit 48892e6

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ PHP NEWS
2525
- LDAP:
2626
. Removed deprecated ldap_sort. (mcmic)
2727

28+
- MBString:
29+
. Removed the unused $is_hex parameter from mb_decode_numericentity(). (cmb)
30+
2831
- mysqlnd:
2932
. Fixed #60594 (mysqlnd exposes 160 lines of stats in phpinfo). (PeeHaa)
3033

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ PHP 8.0 UPGRADE NOTES
172172
. A non-string pattern argument to mb_ereg_replace() will now be interpreted
173173
as a string instead of an ASCII codepoint. The previous behavior may be
174174
restored with an explicit call to chr().
175+
. The $is_hex parameter, which was not used internally, has been removed from
176+
mb_decode_numericentity().
175177

176178
- PCRE:
177179
. When passing invalid escape sequences they are no longer intepreted as

ext/mbstring/mbstring.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_decode_numericentity, 0, 0, 2)
391391
ZEND_ARG_INFO(0, string)
392392
ZEND_ARG_INFO(0, convmap)
393393
ZEND_ARG_INFO(0, encoding)
394-
ZEND_ARG_INFO(0, is_hex)
395394
ZEND_END_ARG_INFO()
396395

397396
ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_send_mail, 0, 0, 3)
@@ -3964,8 +3963,14 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
39643963
zend_bool is_hex = 0;
39653964
mbfl_string string, result, *ret;
39663965

3967-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
3968-
return;
3966+
if (type == 0) {
3967+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
3968+
return;
3969+
}
3970+
} else {
3971+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|s", &str, &str_len, &zconvmap, &encoding, &encoding_len) == FAILURE) {
3972+
return;
3973+
}
39693974
}
39703975

39713976
string.no_language = MBSTRG(language);

0 commit comments

Comments
 (0)