From 378bfbdbe015c8a4d71c49f5b3400f6966c28b61 Mon Sep 17 00:00:00 2001 From: Florent Viel Date: Tue, 16 Dec 2014 14:59:55 +0100 Subject: [PATCH] fix message decoding --- src/Fetch/Message.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Fetch/Message.php b/src/Fetch/Message.php index 67bb1bf..152a4bd 100755 --- a/src/Fetch/Message.php +++ b/src/Fetch/Message.php @@ -541,15 +541,18 @@ class Message $encoding = strtolower($encoding); } - switch (true) { - case $encoding === 'quoted-printable': - case $encoding === 4: - return quoted_printable_decode($data); - - case $encoding === 'base64': - case $encoding === 3: + switch ($encoding) { + case 'base64': + case 3: + case 5: + case 6: + case 7: return base64_decode($data); + case 'quoted-printable': + case 4: + return quoted_printable_decode($data); + default: return $data; }