#48538 [NEW]: iconv_strlen() does not reject invalid charset on PHP6
| From: | wharmby at uk dot ibm dot com | Date: | Fri, 12 Jun 2009 18:17:25 +0000 |
| Subject: | #48538 [NEW]: iconv_strlen() does not reject invalid charset on PHP6 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-138250@lists.php.net to get a copy of this message | ||
From: wharmby at uk dot ibm dot com
Operating system: Win XP Pro
PHP version: 6CVS-2009-06-12 (snap)
PHP Bug Type: ICONV related
Bug description: iconv_strlen() does not reject invalid charset on PHP6
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 bug report at http://bugs.php.net/?id=48538&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48538&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48538&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48538&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48538&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48538&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48538&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48538&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48538&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48538&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48538&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48538&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48538&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48538&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48538&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48538&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48538&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48538&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48538&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48538&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48538&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48538&r=mysqlcfg