summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-12-11 21:39:43 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-12-11 21:39:43 +0000
commit834e516e0678f12f520380a11f042a8e200930cb (patch)
treecc44129080d7e4c0c40b3c2da73cdba4a3286b8c /roundcubemail/program
parent003b1d193f096c69d1fe92c916bf2543f829e7f2 (diff)
- fix warning on PHP5.3 (#1486284)
git-svn-id: https://svn.roundcube.net/trunk@3176 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/include/rcube_imap.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php
index f47f56eb2..5e5a6e03a 100644
--- a/roundcubemail/program/include/rcube_imap.php
+++ b/roundcubemail/program/include/rcube_imap.php
@@ -1281,13 +1281,15 @@ class rcube_imap
// build parts list for headers pre-fetching
for ($i=0, $count=0; $i<count($part); $i++)
if (is_array($part[$i]) && count($part[$i]) > 3)
- // fetch message headers if message/rfc822 or named part (could contain Content-Location header)
- if (strtolower($part[$i][0]) == 'message' ||
- (in_array('name', (array)$part[$i][2]) && (empty($part[$i][3]) || $part[$i][3]=='NIL'))) {
+ // fetch message headers if message/rfc822 or named part (could contain Content-Location header)
+ if (!is_array($part[$i][0]) && (strtolower($part[$i][0]) == 'message' ||
+ (in_array('name', (array)$part[$i][2]) && (empty($part[$i][3]) || $part[$i][3]=='NIL')))) {
$part_headers[] = $struct->mime_id ? $struct->mime_id.'.'.($i+1) : $i+1;
}
// pre-fetch headers of all parts (in one command for better performance)
+ // @TODO: we could do this before _structure_part() call, to fetch
+ // headers for parts on all levels
if ($part_headers)
$part_headers = iil_C_FetchMIMEHeaders($this->conn, $this->mailbox, $this->_msg_id, $part_headers);
@@ -1300,8 +1302,8 @@ class rcube_imap
return $struct;
}
-
-
+
+
// regular part
$struct->ctype_primary = strtolower($part[0]);
$struct->ctype_secondary = strtolower($part[1]);