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
