Bug #6495 [Opn->Csd]: Mail_mimeDecode: Some parts of body not included in decode object

From: Date: Thu, 02 Sep 2010 12:39:58 +0000
Subject: Bug #6495 [Opn->Csd]: Mail_mimeDecode: Some parts of body not included in decode object
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-4738@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=6495&edit=1 ID: 6495 Updated by: alan@akbkhome.com Reported By: alex at wdg dot com dot ua Summary: Mail_mimeDecode: Some parts of body not included in decode object -Status: Open +Status: Closed Type: Bug Package: Mail_mimeDecode Operating System: Linux PHP Version: Irrelevant -Assigned To: +Assigned To: alan_k Roadmap Versions: New Comment: -Status: Open +Status: Closed -Assigned To: +Assigned To: alan_k This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Previous Comments: ------------------------------------------------------------------------ [2006-04-27 10:35:08] cipri Moved to Mail_MimeDecode subpackage. ------------------------------------------------------------------------ [2006-01-15 11:41:20] alex at wdg dot com dot ua Description: ------------ Some email message don't have boundary string at the end of messages. In this case last part of body will missed. I offer follow variant: function _boundarySplit($input, $boundary) { $parts = array(); $bs_possible = substr($boundary, 2, -2); $bs_check = '\"' . $bs_possible . '\"'; if ($boundary == $bs_check) { $boundary = $bs_possible; } $tmp = explode('--' . $boundary, $input); // CHANGES START -- check all elements of array // and add to parts only not empty for ($i = 1; $i < count($tmp); $i++) { if (trim($tmp[$i])) { $parts[] = $tmp[$i]; } } // CHANGES END return $parts; } ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=6495&edit=1

« previous php.pear.bugs (#4738) next »