summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-07-11 20:29:34 +0000
committeralecpl <alec@alec.pl>2009-07-11 20:29:34 +0000
commit5f571eb1dba01a5f257c52978f30cd53d773d15c (patch)
treecc31f936c789c634a1625c4f75d63e20029df773 /program/include/rcube_imap.php
parent713a66fc0fd824906517260c5323d4f8afc919b7 (diff)
- few fixes for last commits
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 394b0d758..c82383402 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1162,7 +1162,7 @@ class rcube_imap
// write structure to cache
if ($this->caching_enabled)
- $this->add_message_cache($cache_key, $msg_id, $headers, $struct);
+ $this->add_message_cache($cache_key, $this->_msg_id, $headers, $struct);
}
return $struct;
@@ -1442,6 +1442,10 @@ class rcube_imap
{
$structure_str = iil_C_FetchStructureString($this->conn, $this->mailbox, $uid, true);
$structure = iml_GetRawStructureArray($structure_str);
+ // error or message not found
+ if (empty($structure))
+ return false;
+
$part_type = iml_GetPartTypeCode($structure, $part);
$o_part = new rcube_message_part;
$o_part->ctype_primary = $part_type==0 ? 'text' : ($part_type==2 ? 'message' : 'other');
@@ -1455,7 +1459,7 @@ class rcube_imap
$body = iil_C_HandlePartBody($this->conn, $this->mailbox, $uid, true, $part,
$o_part->encoding, $print, $fp);
-
+
if ($fp || $print)
return true;