Skip to content

Commit 6031b08

Browse files
committed
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 1333b46.
1 parent efec22b commit 6031b08

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

ext/mbstring/mbstring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,7 @@ PHP_FUNCTION(mb_detect_order)
20382038

20392039
static inline int php_mb_check_code_point(zend_long cp)
20402040
{
2041-
if (cp < 0 || cp >= 0x110000) {
2041+
if (cp <= 0 || cp >= 0x110000) {
20422042
/* Out of Unicode range */
20432043
return 0;
20442044
}

ext/mbstring/tests/bug79448.phpt

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)