diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-07 14:06:09 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-10-07 16:48:08 +0200 |
| commit | e2100619ac064fdd4e7fe79e296a2ca087409e7d (patch) | |
| tree | 548b17c5cb62b1e4c1b784de37af0336902c8cec /ext/mbstring/mbstring.stub.php | |
| parent | 4802df5b3ced2ae39538e91e6561510492ff2817 (diff) | |
| download | php-git-e2100619ac064fdd4e7fe79e296a2ca087409e7d.tar.gz | |
Expect appropriate parameter type in the first place
`mb_encode_numericentity()` and `mb_decode_numericentity()` accepted
arbitrary zvals as `$convmap`, but ignored anything else than arrays.
This appears to be an unresolved relict of their ZPP conversion for
PHP 5.3[1]. We now expect an array in the first place.
We also expect `count($convmap)` to be a multiple of four (else we
throw a `ValueError`), and do no longer special case empty `$convmap`.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=1c77f594294aee9d60e7309279c616c01c39ba9d>
Diffstat (limited to 'ext/mbstring/mbstring.stub.php')
| -rw-r--r-- | ext/mbstring/mbstring.stub.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mbstring/mbstring.stub.php b/ext/mbstring/mbstring.stub.php index fafc4967af..ed017a3fa2 100644 --- a/ext/mbstring/mbstring.stub.php +++ b/ext/mbstring/mbstring.stub.php @@ -112,10 +112,10 @@ function mb_convert_kana(string $str, string $option = UNKNOWN, string $encoding function mb_convert_variables(string $to, $from, &$var, &...$vars) {} /** @return string|false */ -function mb_encode_numericentity(string $string, $convmap, string $encoding = UNKNOWN, bool $is_hex = false) {} +function mb_encode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN, bool $is_hex = false) {} /** @return string|false */ -function mb_decode_numericentity(string $string, $convmap, string $encoding = UNKNOWN) {} +function mb_decode_numericentity(string $string, array $convmap, string $encoding = UNKNOWN) {} function mb_send_mail(string $to, string $subject, string $message, $additional_headers = UNKNOWN, string $additional_parameters = UNKNOWN): bool {} |
