Fix notice undefined index charset

This commit is contained in:
Clément Vasseur 2012-11-13 09:43:12 +01:00
parent b7c53f620e
commit 242ffb2a9e

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) {