From 6031b0824012065b679ed193b6e11b324a5cc92e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 7 Apr 2020 22:23:24 +0200 Subject: Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails" This commit brings some substantial changes in behaviour due to the weird implementation. This will be fixed in master due to BC concerns. This reverts commit 1333b46d6dc0c293c1fd626803f91bc69743eb79. --- ext/mbstring/mbstring.c | 2 +- ext/mbstring/tests/bug79448.phpt | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 ext/mbstring/tests/bug79448.phpt diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index ba30e05c27..0f466a02ee 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2038,7 +2038,7 @@ PHP_FUNCTION(mb_detect_order) static inline int php_mb_check_code_point(zend_long cp) { - if (cp < 0 || cp >= 0x110000) { + if (cp <= 0 || cp >= 0x110000) { /* Out of Unicode range */ return 0; } diff --git a/ext/mbstring/tests/bug79448.phpt b/ext/mbstring/tests/bug79448.phpt deleted file mode 100644 index 09052943cc..0000000000 --- a/ext/mbstring/tests/bug79448.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails ---SKIPIF-- - ---FILE-- - ---EXPECT-- -bool(true) -- cgit v1.2.1