Merge pull request #11 from cvasseur/fix-charset-notice

Fix notice undefined index charset
This commit is contained in:
Robert Hafner 2012-11-13 09:51:55 -08:00
commit 02642b39c4

View File

@ -414,7 +414,7 @@ class Message
$messageBody = self::decode($messageBody, $structure->encoding); $messageBody = self::decode($messageBody, $structure->encoding);
if ($parameters['charset'] !== self::$charset) if (!empty($parameters['charset']) && $parameters['charset'] !== self::$charset)
$messageBody = iconv($parameters['charset'], self::$charset, $messageBody); $messageBody = iconv($parameters['charset'], self::$charset, $messageBody);
if (strtolower($structure->subtype) == 'plain' || $structure->type == 1) { if (strtolower($structure->subtype) == 'plain' || $structure->type == 1) {