]> granicus.if.org Git - php/commitdiff
Remove unused parameter
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 21 Sep 2019 14:25:17 +0000 (16:25 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 21 Sep 2019 14:30:17 +0000 (16:30 +0200)
Cf. <https://bugs.php.net/78579>.

NEWS
UPGRADING
ext/mbstring/mbstring.c

diff --git a/NEWS b/NEWS
index 462e1fa141a595f87d64b9c930e3f17fa87765f8..0d8dd94bbcdac0191b788e3b49a8dcc1f871ae03 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,9 @@ PHP                                                                        NEWS
 - LDAP:
   . Removed deprecated ldap_sort. (mcmic)
 
+- MBString:
+  . Removed the unused $is_hex parameter from mb_decode_numericentity(). (cmb)
+
 - mysqlnd:
   . Fixed #60594 (mysqlnd exposes 160 lines of stats in phpinfo). (PeeHaa)
 
index d1beec50913d3ba6ccee2c3307ff70b0c4ba6623..21fced897ff921b163760a4ccb921860df7357ea 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -172,6 +172,8 @@ PHP 8.0 UPGRADE NOTES
   . A non-string pattern argument to mb_ereg_replace() will now be interpreted
     as a string instead of an ASCII codepoint. The previous behavior may be
     restored with an explicit call to chr().
+  . The $is_hex parameter, which was not used internally, has been removed from
+    mb_decode_numericentity().
 
 - PCRE:
   . When passing invalid escape sequences they are no longer intepreted as
index 1ee71dc1f849bbd19ddd13a5b64561c779d91da7..d42484e35b7428fd58c36a7452dcfab02843de67 100644 (file)
@@ -391,7 +391,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_decode_numericentity, 0, 0, 2)
        ZEND_ARG_INFO(0, string)
        ZEND_ARG_INFO(0, convmap)
        ZEND_ARG_INFO(0, encoding)
-       ZEND_ARG_INFO(0, is_hex)
 ZEND_END_ARG_INFO()
 
 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)
        zend_bool is_hex = 0;
        mbfl_string string, result, *ret;
 
-       if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
-               return;
+       if (type == 0) {
+               if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|sb", &str, &str_len, &zconvmap, &encoding, &encoding_len, &is_hex) == FAILURE) {
+                       return;
+               }
+       } else {
+               if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz|s", &str, &str_len, &zconvmap, &encoding, &encoding_len) == FAILURE) {
+                       return;
+               }
        }
 
        string.no_language = MBSTRG(language);