#34757 [Ver->Csd]: iconv_substr() gives "Unknown error" when offset > string length = 1
| From: | tony2001@php.net | Date: | Tue, 11 Oct 2005 14:00:18 +0000 |
| Subject: | #34757 [Ver->Csd]: iconv_substr() gives "Unknown error" when offset > string length = 1 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86404@lists.php.net to get a copy of this message | ||
ID: 34757
Updated by: tony2001@php.net
Reported By: shagren at ua dot fm
-Status: Verified
+Status: Closed
Bug Type: ICONV related
Operating System: *
PHP Version: 5CVS-2005-10-07 (cvs)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-10-07 09:40:44] sniper@php.net
I got the same result. ICONV is glibc 2.3.5 implementation.
------------------------------------------------------------------------
[2005-10-06 14:11:47] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34757&edit=1