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)
|
public static function decode($data, $encoding)
|
||||||
{
|
{
|
||||||
if (!is_numeric($encoding))
|
if (!is_numeric($encoding)) {
|
||||||
$encoding = strtolower($encoding);
|
$encoding = strtolower($encoding);
|
||||||
|
}
|
||||||
|
|
||||||
switch ($encoding) {
|
switch (true) {
|
||||||
case 'quoted-printable':
|
case $encoding === 'quoted-printable':
|
||||||
case 4:
|
case $encoding === 4:
|
||||||
return quoted_printable_decode($data);
|
return quoted_printable_decode($data);
|
||||||
|
|
||||||
case 'base64':
|
case $encoding === 'base64':
|
||||||
case 3:
|
case $encoding === 3:
|
||||||
return base64_decode($data);
|
return base64_decode($data);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user