Browse Source

Handle missing flags column (in broken messages) a bit more gracefully
(ie without php-warnings).

Thijs Kinkhorst 20 years ago
parent
commit
76a47436fa
1 changed files with 3 additions and 1 deletions
  1. 3 1
      functions/mailbox_display.php

+ 3 - 1
functions/mailbox_display.php

@@ -600,6 +600,8 @@ function prepareMessageList(&$aMailbox, $aProps) {
                                          'answered'=>false,
                                          'flagged' => false,
                                          'draft' => false);
+                                         
+                    if(!is_array($value)) $value = array();                     
                     foreach ($value as $sFlag => $value) {
                         switch ($sFlag) {
                           case '\\seen'    : $aFlagColumn['seen']     = true; break;
@@ -1378,4 +1380,4 @@ function attachSelectedMessages($imapConnection,$aMsgHeaders) {
     return $composesession;
 }
 
-?>
+?>