We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 02a685e + 7a42611 commit 9cb9c53Copy full SHA for 9cb9c53
ext/mbstring/mbstring.c
@@ -1584,7 +1584,7 @@ PHP_FUNCTION(mb_detect_order)
1584
1585
static inline int php_mb_check_code_point(zend_long cp)
1586
{
1587
- if (cp <= 0 || cp >= 0x110000) {
+ if (cp < 0 || cp >= 0x110000) {
1588
/* Out of Unicode range */
1589
return 0;
1590
}
ext/mbstring/tests/bug79448.phpt
@@ -0,0 +1,11 @@
1
+--TEST--
2
+Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
3
+--SKIPIF--
4
+<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
5
+--FILE--
6
+<?php
7
+// 0 is a valid codepoint regardless of encoding
8
+var_dump(mb_substitute_character(0));
9
+?>
10
+--EXPECT--
11
+bool(true)
0 commit comments