Bug #48538 [Opn->Wfx]: iconv_strlen() does not reject invalid charset on PHP6
| From: | felipe@php.net | Date: | Sun, 20 Jun 2010 21:53:19 +0000 |
| Subject: | Bug #48538 [Opn->Wfx]: iconv_strlen() does not reject invalid charset on PHP6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151678@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=48538&edit=1
ID: 48538
Updated by: felipe@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