summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-01-29 14:27:00 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-01-29 14:27:00 +0000
commit9ea1b334066e0da305004959c892e308f05ef276 (patch)
treec5ba81f8888a40935a1026e660d5f050c82315e3 /roundcubemail/program/include
parent8167bf21ec421056bebe5c1958dc742d309c25a4 (diff)
Check mime headers before attempt to parse them (#1487745); broken since r4421
git-svn-id: https://svn.roundcube.net/trunk@4468 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_imap.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index cab232da4..a4e67e140 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -2238,7 +2238,11 @@ class rcube_imap
$mime_headers = $this->conn->fetchPartHeader(
$this->mailbox, $this->_msg_id, false, $struct->mime_id);
}
- $struct->headers = $this->_parse_headers($mime_headers) + $struct->headers;
+
+ if (is_string($mime_headers))
+ $struct->headers = $this->_parse_headers($mime_headers) + $struct->headers;
+ else if (is_object($mime_headers))
+ $struct->headers = get_object_vars($mime_headers) + $struct->headers;
// get real content-type of message/rfc822
if ($struct->mimetype == 'message/rfc822') {