#35904 [NEW]: iconv_mime_decode_headers need trim($headers) before using it
| From: | eugen at id dot com dot ua | Date: | Thu, 05 Jan 2006 12:03:19 +0000 |
| Subject: | #35904 [NEW]: iconv_mime_decode_headers need trim($headers) before using it | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-91540@lists.php.net to get a copy of this message | ||
From: eugen at id dot com dot ua
Operating system: Linux kernel 2.6.9
PHP version: 5.1.2RC1
PHP Bug Type: ICONV related
Bug description: iconv_mime_decode_headers need trim($headers) before using it
Description:
------------
If headers contain leading newline, iconv_mime_decode_headers return empty
array instead of parsed headers array
Reproduce code:
---------------
$headers = '
Subject: Test
From: myself@dot.com
';
print_r(iconv_mime_decode_headers($headers));
/* Note, that $headers string start with newline*/
Expected result:
----------------
Array
(
[Subject] => Test
[From] => myself@dot.com
)
Actual result:
--------------
Array
(
)
--
Edit bug report at http://bugs.php.net/?id=35904&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35904&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35904&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35904&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35904&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35904&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35904&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35904&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35904&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35904&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35904&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35904&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35904&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35904&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35904&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35904&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35904&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35904&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35904&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35904&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35904&r=mysqlcfg