From 3b7e00fbdaee197e6ccd832a3f10dbb417373f4c Mon Sep 17 00:00:00 2001 From: alecpl Date: Sun, 19 Jul 2009 19:15:40 +0000 Subject: - don't call FETCH for empty (size=0) message parts --- program/steps/mail/func.inc | 2 +- program/steps/mail/get.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'program') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index a942c1a44..448663519 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -987,7 +987,7 @@ function rcmail_message_body($attrib) { if ($part->type == 'headers') $out .= rcmail_message_headers(sizeof($header_attrib) ? $header_attrib : NULL, $part->headers); - else if ($part->type == 'content') + else if ($part->type == 'content' && $part->size) { if (empty($part->ctype_parameters) || empty($part->ctype_parameters['charset'])) $part->ctype_parameters['charset'] = $MESSAGE->headers->charset; diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index cf66914d7..f86c152c6 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -113,7 +113,7 @@ else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) { // turn off output buffering and print part content if ($part->body) echo $part->body; - else + else if ($part->size) $IMAP->get_message_part($MESSAGE->uid, $part->mime_id, $part, true); } -- cgit v1.2.3