summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'roundcubemail/program/steps/mail')
-rw-r--r--roundcubemail/program/steps/mail/func.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index 0cd6652ad..827f13100 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -1245,9 +1245,9 @@ function rcmail_first_text_part($message_struct)
{
global $IMAP;
- if (!is_array($message_struct['parts']))
- return FALSE;
-
+ if (empty($message_struct['parts']))
+ return $message_struct['UID'] ? $IMAP->get_body($message_struct['UID']) : false;
+
// check all message parts
foreach ($message_struct['parts'] as $pid => $part)
{