From 1e6ec6fb2ce7061988dcafa499e20ca7a4a496d1 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Thu, 28 Aug 2025 16:08:08 +0300 Subject: [PATCH 1/7] mb-decode-numericentity.xml Clarify the ValueError conditions --- reference/mbstring/functions/mb-decode-numericentity.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reference/mbstring/functions/mb-decode-numericentity.xml b/reference/mbstring/functions/mb-decode-numericentity.xml index 151b8855cd85..6d5db9e0f56a 100644 --- a/reference/mbstring/functions/mb-decode-numericentity.xml +++ b/reference/mbstring/functions/mb-decode-numericentity.xml @@ -62,7 +62,8 @@ &reftitle.errors; Throws a ValueError if - map is not a list of &integer;s. + map contains any value that is not an + &integer;, &boolean;, &null;, or a numeric &string;. From 11d263185a49cb12db86ca02b46ff664202e42a2 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Thu, 28 Aug 2025 16:11:20 +0300 Subject: [PATCH 2/7] mb-encode-numericentity.xml Clarify the ValueError conditions --- reference/mbstring/functions/mb-encode-numericentity.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reference/mbstring/functions/mb-encode-numericentity.xml b/reference/mbstring/functions/mb-encode-numericentity.xml index 7334bdeed352..d11b97258e54 100644 --- a/reference/mbstring/functions/mb-encode-numericentity.xml +++ b/reference/mbstring/functions/mb-encode-numericentity.xml @@ -73,7 +73,8 @@ &reftitle.errors; Throws a ValueError if - map is not a list of &integer;s. + map contains any value that is not an + &integer;, &boolean;, &null;, or a numeric &string;. From 31e3fafb6b0395f613ce52a37c0042e3e2ee57bd Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Thu, 28 Aug 2025 16:21:12 +0300 Subject: [PATCH 3/7] Update mb-encode-numericentity.xml --- reference/mbstring/functions/mb-encode-numericentity.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/mbstring/functions/mb-encode-numericentity.xml b/reference/mbstring/functions/mb-encode-numericentity.xml index d11b97258e54..8c3ad3ad694d 100644 --- a/reference/mbstring/functions/mb-encode-numericentity.xml +++ b/reference/mbstring/functions/mb-encode-numericentity.xml @@ -74,7 +74,7 @@ Throws a ValueError if map contains any value that is not an - &integer;, &boolean;, &null;, or a numeric &string;. + &integer;, &float;, &boolean;, &null;, or a numeric &string;. From c5d49bf4f78cfc50f05360779f969595d1c0bb95 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Thu, 28 Aug 2025 16:21:17 +0300 Subject: [PATCH 4/7] Update mb-decode-numericentity.xml --- reference/mbstring/functions/mb-decode-numericentity.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/mbstring/functions/mb-decode-numericentity.xml b/reference/mbstring/functions/mb-decode-numericentity.xml index 6d5db9e0f56a..8003cf8230d6 100644 --- a/reference/mbstring/functions/mb-decode-numericentity.xml +++ b/reference/mbstring/functions/mb-decode-numericentity.xml @@ -63,7 +63,7 @@ Throws a ValueError if map contains any value that is not an - &integer;, &boolean;, &null;, or a numeric &string;. + &integer;, &float;, &boolean;, &null;, or a numeric &string;. From e2823c88a785108aaa91e32278d1f5b6303b3188 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Thu, 28 Aug 2025 16:37:00 +0300 Subject: [PATCH 5/7] Update mb-decode-numericentity.xml --- reference/mbstring/functions/mb-decode-numericentity.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reference/mbstring/functions/mb-decode-numericentity.xml b/reference/mbstring/functions/mb-decode-numericentity.xml index 8003cf8230d6..a29178139db5 100644 --- a/reference/mbstring/functions/mb-decode-numericentity.xml +++ b/reference/mbstring/functions/mb-decode-numericentity.xml @@ -63,7 +63,7 @@ Throws a ValueError if map contains any value that is not an - &integer;, &float;, &boolean;, &null;, or a numeric &string;. + &integer;, &float;, &boolean;, &null;, or a numeric string. @@ -81,9 +81,10 @@ 8.4.0 - mb_decode_numericentity now throws a + The mb_decode_numericentity function now throws a ValueError if map - is not a list of &integer;s. + contains any value that is not an + &integer;, &float;, &boolean;, &null;, or a numeric string. &mbstring.changelog.encoding-nullable; From 572b665235d2b4fd1faa4a467a6d01b19a8a6d84 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Thu, 28 Aug 2025 16:37:03 +0300 Subject: [PATCH 6/7] Update mb-encode-numericentity.xml --- reference/mbstring/functions/mb-encode-numericentity.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reference/mbstring/functions/mb-encode-numericentity.xml b/reference/mbstring/functions/mb-encode-numericentity.xml index 8c3ad3ad694d..bced7bd21320 100644 --- a/reference/mbstring/functions/mb-encode-numericentity.xml +++ b/reference/mbstring/functions/mb-encode-numericentity.xml @@ -74,7 +74,7 @@ Throws a ValueError if map contains any value that is not an - &integer;, &float;, &boolean;, &null;, or a numeric &string;. + &integer;, &float;, &boolean;, &null;, or a numeric string. @@ -92,9 +92,10 @@ 8.4.0 - mb_encode_numericentity now throws a + The mb_encode_numericentity function now throws a ValueError if map - is not a list of &integer;s. + contains any value that is not an + &integer;, &float;, &boolean;, &null;, or a numeric string. &mbstring.changelog.encoding-nullable; From 6d6871bd30d1aae669a13c62fc92e05c4e2495f4 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Tue, 18 Aug 2026 20:39:12 +0300 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Louis-Arnaud --- reference/mbstring/functions/mb-decode-numericentity.xml | 3 +-- reference/mbstring/functions/mb-encode-numericentity.xml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/reference/mbstring/functions/mb-decode-numericentity.xml b/reference/mbstring/functions/mb-decode-numericentity.xml index a29178139db5..af2002729281 100644 --- a/reference/mbstring/functions/mb-decode-numericentity.xml +++ b/reference/mbstring/functions/mb-decode-numericentity.xml @@ -83,8 +83,7 @@ The mb_decode_numericentity function now throws a ValueError if map - contains any value that is not an - &integer;, &float;, &boolean;, &null;, or a numeric string. + contains any value that cannot be implicitly converted to int. &mbstring.changelog.encoding-nullable; diff --git a/reference/mbstring/functions/mb-encode-numericentity.xml b/reference/mbstring/functions/mb-encode-numericentity.xml index bced7bd21320..4aa19143400f 100644 --- a/reference/mbstring/functions/mb-encode-numericentity.xml +++ b/reference/mbstring/functions/mb-encode-numericentity.xml @@ -94,8 +94,7 @@ The mb_encode_numericentity function now throws a ValueError if map - contains any value that is not an - &integer;, &float;, &boolean;, &null;, or a numeric string. + contains any value that cannot be implicitly converted to int. &mbstring.changelog.encoding-nullable;