diff options
author | till <till@php.net> | 2008-02-11 17:28:02 +0000 |
---|---|---|
committer | till <till@php.net> | 2008-02-11 17:28:02 +0000 |
commit | 8ecb0e8fb9b10ef424a5088545f68fb939ccf7c8 (patch) | |
tree | 2c934488ef0e37355726f02c0cb16562a0a5d890 /program | |
parent | 363e15c67854e41df28bd57d11b7a9a026b0c7a9 (diff) |
* fixing bug (1 attachment gets cut off when you have no text in a draft) -> see #1484673
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/compose.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 908bc277e..3e768c868 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -562,10 +562,14 @@ function rcmail_create_forward_body($body, $bodyIsHtml) function rcmail_create_draft_body($body, $bodyIsHtml) { global $IMAP, $MESSAGE; - - // add attachments - if (!isset($_SESSION['compose']['forward_attachments']) && - is_array($MESSAGE['parts']) && sizeof($MESSAGE['parts'])>1) + + /** + * add attachments + * sizeof($MESSAGE['parts'] can be 1 - e.g. attachment, but no text! + */ + if (!isset($_SESSION['compose']['forward_attachments']) + && is_array($MESSAGE['parts']) + && count($MESSAGE['parts']) > 0) rcmail_write_compose_attachments($MESSAGE); return $body; |