iconv_substr() gives "Unknown error" when string length = 1"
| Bug #37773 | iconv_substr() gives "Unknown error" when string length = 1" | ||||
|---|---|---|---|---|---|
| Submitted: | 2006-06-10 00:01 UTC | Modified: | 2006-11-15 18:35 UTC | ||
| From: | dave at dgx dot cz | Assigned: | |||
| Status: | Closed | Package: | ICONV related | ||
| PHP Version: | 5.1.4 | OS: | |||
| Private report: | No | CVE-ID: | None | ||
[2006-06-10 00:01 UTC] dave at dgx dot cz
Description: ------------ (Similar to bug #34757). When input string length = 1, iconv_substr() produces "Unknown error (0)" and returns FALSE. Reproduce code: --------------- $s = 'x'; $s = iconv_substr($s, 0, 1, 'UTF-8'); var_dump($s); Expected result: ---------------- string(1) "x" Actual result: -------------- bool(false) and Notice: iconv_substr() [function.iconv-substr.html]: Unknown error (0) in ...
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-06-10 00:03 UTC] dave at dgx dot cz
[2006-07-06 02:41 UTC] moriyoshi@php.net
[2006-11-15 18:35 UTC] iliaa@php.net