#43903 [NEW]: imap_fetchbody() dorst not eork properly

From: Date: Mon, 21 Jan 2008 09:21:03 +0000
Subject: #43903 [NEW]: imap_fetchbody() dorst not eork properly
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121425@lists.php.net to get a copy of this message
From: reports at vishnivetsky dot ru Operating system: Linux plesk.rtcomm-sibir.ru 2.6. PHP version: 4.4.8 PHP Bug Type: IMAP related Bug description: imap_fetchbody() dorst not eork properly Description: ------------ The problem is whet I try to fetch message with following structure: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------636F494B2165" ------------636F494B2165 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Here comes plain text with cyrillic characters. sd fsd f sdf s df sdf sf s &#1099;&#1083;&#1074;&#1086;&#1072;&#1088;&#1083;&#1086;&#1088;&#1087;&#1083; ------------636F494B2165 Content-Type: application/octet-stream; name="vssver.scc" Content-transfer-encoding: base64 Content-Disposition: attachment; filename="vssver.scc" NBIBADCSAGDjY9URiUMAkCdir0j+oz57LigBAAAAAACQ0QEAUdL+w7xrBRUCAAAA ------------636F494B2165-- So when I try to call imap_fetchbody() with partid = 1 (where plain text is) I returns an empty string some times. I have tested this operation on messages, that differs only by length of TEXT/PLAIN part and presence of cyrrilic characters. So when length is more then 50-100 bytes and we have cyrillic characters in the end of this part the imap_fetchbody() returns en empty string. Reproduce code: --------------- imap_fetchbody( $mbox, ($HTTP_GET_VARS['msgid']+0), ($HTTP_GET_VARS['partid']), FT_PEEK || FT_UID ) Expected result: ---------------- Here comes plain text with cyrillic characters. sd fsd f sdf s df sdf sf s &#1099;&#1083;&#1074;&#1086;&#1072;&#1088;&#1083;&#1086;&#1088;&#1087;&#1083; Actual result: -------------- <an empty string> -- Edit bug report at http://bugs.php.net/?id=43903&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43903&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43903&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43903&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43903&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43903&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43903&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43903&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43903&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43903&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43903&r=support Expected behavior: http://bugs.php.net/fix.php?id=43903&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43903&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43903&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43903&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43903&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43903&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43903&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43903&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43903&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43903&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43903&r=mysqlcfg

« previous php.bugs (#121425) next »