mirror of
https://github.com/retailcrm/Fetch.git
synced 2024-11-22 19:26:01 +03:00
Fix Attachment encoding problem when saving to disk
The case statement returned true for 0 == 'quoted-printable', and base64 decoded all 7bit encoded attachments. I have removed the string representations as an int is always returned by PHP's imap functions for encoding type.
This commit is contained in:
parent
6a581535e4
commit
3e9400bfe0
@ -206,13 +206,11 @@ class Attachment
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch ($this->encoding) {
|
switch ($this->encoding) {
|
||||||
case 3:
|
case 3: //base64
|
||||||
case 'base64':
|
|
||||||
$streamFilter = stream_filter_append($filePointer, 'convert.base64-decode', STREAM_FILTER_WRITE);
|
$streamFilter = stream_filter_append($filePointer, 'convert.base64-decode', STREAM_FILTER_WRITE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4: //quoted-printable
|
||||||
case 'quoted-printable':
|
|
||||||
$streamFilter = stream_filter_append($filePointer, 'convert.quoted-printable-decode', STREAM_FILTER_WRITE);
|
$streamFilter = stream_filter_append($filePointer, 'convert.quoted-printable-decode', STREAM_FILTER_WRITE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user