1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-23 19:02:46 +01:00

Fix empty body issue when fetching emails via Webklex/php-imap library - closes #1972

This commit is contained in:
FreeScout 2023-03-17 07:21:49 -07:00
parent 867876c1b7
commit a76c512a1e

View File

@ -724,7 +724,11 @@ class Message {
}
if (function_exists('iconv') && $from != 'UTF-7' && $to != 'UTF-7') {
return @iconv($from, $to.'//IGNORE', $str);
try {
return iconv($from, $to.'//IGNORE', $str);
} catch (\Exception $e) {
return @iconv($from, $to, $str);
}
} else {
if (!$from) {
return mb_convert_encoding($str, $to);