Edit report at http://bugs.php.net/bug.php?id=48538&edit=1
ID: 48538 Updated by: fel...@php.net Reported by: wharmby at uk dot ibm dot com Summary: iconv_strlen() does not reject invalid charset on PHP6 -Status: Open +Status: Wont fix Type: Bug Package: ICONV related Operating System: Win XP Pro PHP Version: 6CVS-2009-06-12 (snap) New Comment: This just occurred in the old trunk version. Previous Comments: ------------------------------------------------------------------------ [2009-06-12 19:01:48] wharmby at uk dot ibm dot com Two new PHP 6 tests dropped which are tagged as XFAIL until this defect resolved. They are ext/iconv/tests/iconv_strlen_variation2.phpt ext/iconv/tests/iconv_strpos_error_2.phpt ------------------------------------------------------------------------ [2009-06-12 18:17:25] wharmby at uk dot ibm dot com Description: ------------ The PHP 6 version of iconv_strlen() does not raise a notice when a invalid charset is specified for the optional charset argument Similar issue with iconv_strpos(). Reproduce code: --------------- <?php $string = 'abcdef'; $encoding = 'unknown-encoding'; var_dump(iconv_strlen($string, $encoding)); ?> Expected result: ---------------- bool(false) PHP Notice: iconv_strlen(): Wrong charset, conversion from `unknown-encoding' to `UCS-4LE' is not allowed in ... Actual result: -------------- int(6) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=48538&edit=1