summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-01 14:52:59 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-01 14:54:30 +0200
commitf2d12f4363568a8690920241023c93aea8a1b63d (patch)
tree16fc9cdbb576ca7328b43bf3d3a751f7a8c9058b /program/steps/mail
parent276ea5fcaec2e9fd79a5c1d90ab78104252b35b5 (diff)
Fix fatal error when opening non-existing message in compose window
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 5d588ab51..e04986a76 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -198,7 +198,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);