mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-22 11:16:03 +03:00
fix the behavior in Message:decode
This commit is contained in:
parent
52930d5d75
commit
cab0aca17c
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user