1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/mbstring/tests/bug81693.phpt
Christoph M. Becker 929d847152 Fix #81693: mb_check_encoding(7bit) segfaults
`php_mb_check_encoding()` now uses conversion to `mbfl_encoding_wchar`.
Since `mbfl_encoding_7bit` has no `input_filter`, no filter can be
found.  Since we don't actually need to convert to wchar, we encode to
8bit.

Closes GH-7712.
2021-12-03 22:49:47 +01:00

11 lines
172 B
PHP

--TEST--
Bug #81693 (mb_check_encoding(7bit) segfaults)
--EXTENSIONS--
mbstring
--FILE--
<?php
var_dump(mb_check_encoding('Hello world', '7bit'));
?>
--EXPECT--
bool(true)