PHP :: Bug #34757 :: iconv_substr() gives "Unknown error" when offset
| Bug #34757 | iconv_substr() gives "Unknown error" when offset > string length = 1 | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2005-10-06 14:11 UTC | Modified: | 2005-10-11 16:00 UTC |
|
||||||||||
| From: | shagren at ua dot fm | Assigned: | ||||||||||||
| Status: | Closed | Package: | ICONV related | |||||||||||
| PHP Version: | 5CVS-2005-10-07 (cvs) | OS: | * | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2005-10-06 14:11 UTC] shagren at ua dot fm
Description:
------------
For some "small"(or empty) stringes iconv_substr produce error when try to use offset > strlen
Reproduce code:
---------------
<?php
$x = iconv_substr("a",3,2);
var_dump($x);
?>
Expected result:
----------------
bool(false)
Actual result:
--------------
PHP Notice: iconv_substr(): Unknown error (0) in C:\temp\1.php on line 2
Notice: iconv_substr(): Unknown error (0) in C:\temp\1.php on line 2
bool(false)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2005-10-07 09:40 UTC] sniper@php.net
[2005-10-11 16:00 UTC] tony2001@php.net