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.
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;
}
+++ /dev/null
---TEST--
-Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
---SKIPIF--
-<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
---FILE--
-<?php
-// 0 is a valid codepoint regardless of encoding
-var_dump(mb_substitute_character(0));
-?>
---EXPECT--
-bool(true)