Skip to content

Commit a54ee6e

Browse files
committed
Merge branch 'PHP-7.4'
2 parents 229dff9 + cc00526 commit a54ee6e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ext/mbstring/tests/bug79441.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Bug #79441 Segfault in mb_chr() if internal encoding is unsupported
3+
--SKIPIF--
4+
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
5+
--FILE--
6+
<?php
7+
8+
mb_internal_encoding("utf-7");
9+
try {
10+
mb_chr(0xd800);
11+
} catch (\ValueError $e) {
12+
echo $e->getMessage() . \PHP_EOL;
13+
}
14+
15+
?>
16+
--EXPECT--
17+
mb_chr() does not support the "UTF-7" encoding

0 commit comments

Comments
 (0)