From cbbdef2abcc419765b40a3eda08643063216fbca Mon Sep 17 00:00:00 2001 From: fidian Date: Tue, 6 Feb 2001 20:30:03 +0000 Subject: [PATCH] * More fixes * $boxes[$i]['flags'] is always an array now. :-) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1064 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 2 ++ functions/mailbox_display.php | 3 +-- src/left_main.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index d36c6623..dc701517 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -163,6 +163,8 @@ if ($flags) { $boxes[$g]['flags'] = explode(' ', $flags); } + else + $boxes[$g]['flags'] = array(); } return $boxes; diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index f52cd122..e534c936 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -517,8 +517,7 @@ $boxes = sqimap_mailbox_list($imapConnection); for ($i = 0; $i < count($boxes); $i++) { - if (!is_array($boxes[$i]['flags']) || - !in_array("noselect", $boxes[$i]['flags'])) { + if (!in_array("noselect", $boxes[$i]['flags'])) { $box = $boxes[$i]['unformatted']; $box2 = replace_spaces($boxes[$i]['unformatted-disp']); echo " \n"; diff --git a/src/left_main.php b/src/left_main.php index 0077c07d..2966c74a 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -138,7 +138,7 @@ $line = ""; $mailbox = $boxes[$i]["formatted"]; - if (isset($boxes[$i]["flags"])) { + if (count($boxes[$i]["flags"])) { $noselect = false; for ($h = 0; $h < count($boxes[$i]["flags"]); $h++) { if (strtolower($boxes[$i]["flags"][$h]) == "noselect") -- 2.25.1