diff options
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/main.inc | 2 | ||||
-rw-r--r-- | program/include/rcube_imap.inc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/program/include/main.inc b/program/include/main.inc index 921494829..ae7d50b9f 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -842,7 +842,7 @@ function rcube_charset_convert($str, $from, $to=NULL) $from = strtoupper($from); $to = $to==NULL ? strtoupper($GLOBALS['CHARSET']) : strtoupper($to); - if ($from==$to || $str=='') + if ($from==$to || $str=='' || empty($from)) return $str; // convert charset using mbstring module diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index bcbea816e..c4dfd2023 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -1010,10 +1010,11 @@ class rcube_imap // get part size if (!empty($part[6]) && $part[6]!='NIL') $struct->size = intval($part[6]); - + // read part disposition $di = count($part) - 2; - if (is_array($part[$di])) + if ((is_array($part[$di]) && count($part[$di]) == 2 && is_array($part[$di][1])) || + (is_array($part[--$di]) && count($part[$di]) == 2)) { $struct->disposition = strtolower($part[$di][0]); |