diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-08-01 14:52:59 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-08-01 14:52:59 +0200 |
commit | f7ffdc90aab8d37c2f2c1c89a8e8f68cb793ac00 (patch) | |
tree | 4bd5e0e93f2615ee77a2543b4ffd10aea664b6b4 /program | |
parent | 93b0a30c1c8aa29d862b587b31e52bcc344b8d16 (diff) |
Fix fatal error when opening non-existing message in compose window
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/mail/compose.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 590d9c27f..9bf36d225 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -207,7 +207,10 @@ if (!empty($msg_uid) && empty($COMPOSE['as_attachment'])) if (!empty($MESSAGE->headers->charset)) $RCMAIL->storage->set_charset($MESSAGE->headers->charset); - if ($compose_mode == RCUBE_COMPOSE_REPLY) { + if (!$MESSAGE->headers) { + // error + } + else if ($compose_mode == RCUBE_COMPOSE_REPLY) { $COMPOSE['reply_uid'] = $msg_uid; $COMPOSE['reply_msgid'] = $MESSAGE->headers->messageID; $COMPOSE['references'] = trim($MESSAGE->headers->references . " " . $MESSAGE->headers->messageID); |