Catch bad dates.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Dec 2008 16:54:53 +0000 (09:54 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Dec 2008 16:54:53 +0000 (09:54 -0700)
imp/lib/UI/Mailbox.php

index b34b071..114449b 100644 (file)
@@ -201,7 +201,11 @@ class IMP_UI_Mailbox
             $this->_cache['today_end'] = strtotime('today + 1 day');
         }
 
-        $d = new DateTime($date);
+        try {
+            $d = new DateTime($date);
+        } catch (Exception $e) {
+            return _("Unknown Date");
+        }
         $udate = $d->format('U');
 
         if (($udate < $this->_cache['today_start']) ||