Skip to content

Commit

Permalink
Message may not have date; envelope object will return empty date obj…
Browse files Browse the repository at this point in the history
…ect by default, which will resolve to current time
  • Loading branch information
slusarz committed Jul 24, 2014
1 parent eb72685 commit eb451bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion imp/lib/Ajax/Application/ListMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,9 @@ private function _getOverviewData($mbox, $msglist)
$msg['size'] = IMP::sizeFormat($ob['size']);

/* Format the Date: Header. */
$msg['date'] = strval(new IMP_Message_Date($ob['envelope']->date));
$msg['date'] = strval(new IMP_Message_Date(
isset($ob['envelope']->date) ? $ob['envelope']->date : null
));

/* Format the From: Header. */
$getfrom = $imp_ui->getFrom($ob['envelope']);
Expand Down
2 changes: 1 addition & 1 deletion imp/lib/Block/Newmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function _content()
foreach ($fetch_ret as $uid => $ob) {
$envelope = $ob->getEnvelope();

$date = new IMP_Message_Date($envelope->date);
$date = new IMP_Message_Date(isset($envelope->date) ? $envelope->date : null);
$from = $imp_ui->getFrom($envelope);
$subject = $imp_ui->getSubject($envelope->subject, true);

Expand Down

0 comments on commit eb451bb

Please sign in to comment.