1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/ext/iconv/tests/bug60494.phpt
Christoph M. Becker e29c946c29 Fix #60494: iconv_mime_decode does ignore special characters
We must not ignore erroneous characters in mime headers, but rather let
iconv_mime_decode() fail in this case, issuing the usual notice
regarding illegal characters.
2018-08-25 17:40:39 +02:00

24 lines
637 B
PHP

--TEST--
Bug #60494 (iconv_mime_decode does ignore special characters)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
var_dump(iconv_mime_decode('ä'));
var_dump(iconv_mime_decode('ö'));
var_dump(iconv_mime_decode('ß'));
?>
===DONE===
--EXPECTF--
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
bool(false)
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
bool(false)
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
bool(false)
===DONE===