From 0ec948b40a70214f626d40321d25fe7069f6d2bf Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Thu, 3 Sep 2026 13:40:38 +0200 Subject: [PATCH] [Sync-En] ext/mbstring: clarify the ValueError conditions of mb_*code_numericentity --- .../functions/mb-decode-numericentity.xml | 127 ++++++++++-------- .../functions/mb-encode-numericentity.xml | 26 ++-- 2 files changed, 84 insertions(+), 69 deletions(-) diff --git a/reference/mbstring/functions/mb-decode-numericentity.xml b/reference/mbstring/functions/mb-decode-numericentity.xml index 9fe776c671..b26f0d1bdf 100644 --- a/reference/mbstring/functions/mb-decode-numericentity.xml +++ b/reference/mbstring/functions/mb-decode-numericentity.xml @@ -1,5 +1,5 @@ - + @@ -63,7 +63,8 @@ &reftitle.errors; Genera una excepción ValueError si - map no es una lista de &integer;s. + map contiene algún valor que no sea un + &integer;, un &float;, un &boolean;, &null; o una cadena numérica. @@ -81,9 +82,9 @@ 8.4.0 - mb_decode_numericentity ahora genera una + La función mb_decode_numericentity ahora genera una ValueError si map - no es una lista de &integer;s. + contiene algún valor que no pueda convertirse implícitamente a int. &mbstring.changelog.encoding-nullable; @@ -100,11 +101,13 @@ ]]> diff --git a/reference/mbstring/functions/mb-encode-numericentity.xml b/reference/mbstring/functions/mb-encode-numericentity.xml index dd423dc56e..70676d9e3e 100644 --- a/reference/mbstring/functions/mb-encode-numericentity.xml +++ b/reference/mbstring/functions/mb-encode-numericentity.xml @@ -1,5 +1,5 @@ - + @@ -74,7 +74,8 @@ &reftitle.errors; Lanza una ValueError si - map no es una lista de &integer;s. + map contiene algún valor que no sea un + &integer;, un &float;, un &boolean;, &null; o una cadena numérica. @@ -92,9 +93,9 @@ 8.4.0 - mb_encode_numericentity ahora lanza una + La función mb_encode_numericentity ahora lanza una ValueError si map - no es una lista de &integer;s. + contiene algún valor que no pueda convertirse implícitamente a int. &mbstring.changelog.encoding-nullable; @@ -111,14 +112,16 @@ ]]> @@ -143,6 +146,7 @@ $convmap = [ 0x80, 0x7FF, 0, 0x10FFFF, 0x10000, 0x1FFFFF, 0, 0x10FFFF, ]; + var_dump(mb_encode_numericentity($str, $convmap, "utf8")); ?> ]]>