* $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
if ($flags) {
$boxes[$g]['flags'] = explode(' ', $flags);
}
+ else
+ $boxes[$g]['flags'] = array();
}
return $boxes;
$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 " <OPTION VALUE=\"$box\">$box2</option>\n";
$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")