summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-10-12 12:08:27 +0200
committerAleksander Machniak <alec@alec.pl>2012-10-12 12:10:20 +0200
commit821d3c49629d3f05cfbe67d0cbd623e482cd0543 (patch)
treeb1d43b8145554f85e1a016f6aa3777c8cad9a4c4
parent3508bebb8e5045a27f12c57d8d346d72b950a969 (diff)
Fix displaying of multipart/alternative messages with empty parts (#1488750)
Conflicts: CHANGELOG
-rw-r--r--CHANGELOG1
-rw-r--r--program/include/rcube_message.php4
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index f37d5af98..c5e650f86 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix displaying of multipart/alternative messages with empty parts (#1488750)
- Fix Warning: htmlspecialchars(): charset `RCMAIL_CHARSET' not supported warning in Installer (#1488744)
- Fix threaded list sorting on PHP < 5.2.9 (#1488748)
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index 745019e18..f5d253dc6 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -364,6 +364,10 @@ class rcube_message
foreach ($structure->parts as $p => $sub_part) {
$sub_mimetype = $sub_part->mimetype;
+ // skip empty parts
+ if (!$sub_part->size)
+ continue;
+
// check if sub part is
if ($sub_mimetype == 'text/plain')
$plain_part = $p;