Handle missing flags column (in broken messages) a bit more gracefully
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 22 May 2005 13:11:58 +0000 (13:11 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 22 May 2005 13:11:58 +0000 (13:11 +0000)
(ie without php-warnings).

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9436 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index 9f7b277..4c6de6d 100644 (file)
@@ -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;
 }
 
-?>
\ No newline at end of file
+?>