From e2100619ac064fdd4e7fe79e296a2ca087409e7d Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 7 Oct 2019 14:06:09 +0200 Subject: 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] --- ext/mbstring/mbstring.stub.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/mbstring/mbstring.stub.php') 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 {} -- cgit v1.2.1