fix the behavior in Message:decode

This commit is contained in:
Richard Shank 2014-05-07 14:26:59 -07:00
parent 52930d5d75
commit cab0aca17c

View File

@ -481,16 +481,17 @@ class Message
*/
public static function decode($data, $encoding)
{
if (!is_numeric($encoding))
if (!is_numeric($encoding)) {
$encoding = strtolower($encoding);
}
switch ($encoding) {
case 'quoted-printable':
case 4:
switch (true) {
case $encoding === 'quoted-printable':
case $encoding === 4:
return quoted_printable_decode($data);
case 'base64':
case 3:
case $encoding === 'base64':
case $encoding === 3:
return base64_decode($data);
default: