Sanity checking
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 27 Sep 2010 05:54:31 +0000 (23:54 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 27 Sep 2010 17:25:01 +0000 (11:25 -0600)
imp/message.php

index dba6e69..9afac40 100644 (file)
@@ -227,6 +227,11 @@ try {
         Horde_Imap_Client::FETCH_HEADERTEXT => array(array('parse' => true, 'peek' => $peek))
     ), array('ids' => array($uid)));
 } catch (Horde_Imap_Client_Exception $e) {
+    $fetch_ret = null;
+}
+
+if (is_null($fetch_ret) || !isset($fetch_ret[$uid]['headertext'])) {
+    _returnToMailbox(null, 'message_missing');
     require IMP_BASE . '/mailbox.php';
     exit;
 }