summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-04-03 21:16:04 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-04-03 21:18:45 +0200
commit1333b46d6dc0c293c1fd626803f91bc69743eb79 (patch)
tree6155f240cc52be72dba97c0d0cc66e1e20d6d237 /ext/mbstring/tests
parentee21657a6a2d64e12ba03eae70dd7b7cb2569d82 (diff)
downloadphp-git-1333b46d6dc0c293c1fd626803f91bc69743eb79.tar.gz
Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails
Diffstat (limited to 'ext/mbstring/tests')
-rw-r--r--ext/mbstring/tests/bug79448.phpt11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/mbstring/tests/bug79448.phpt b/ext/mbstring/tests/bug79448.phpt
new file mode 100644
index 0000000000..09052943cc
--- /dev/null
+++ b/ext/mbstring/tests/bug79448.phpt
@@ -0,0 +1,11 @@
+--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)