瀏覽代碼

Hopefully fixes problem with "wrong datatype for second argument to in_array"

Tyler Akins 24 年之前
父節點
當前提交
ae170e7286
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      functions/mailbox_display.php

+ 2 - 1
functions/mailbox_display.php

@@ -523,7 +523,8 @@
 
       $boxes = sqimap_mailbox_list($imapConnection);
       for ($i = 0; $i < count($boxes); $i++) {
-         if (!in_array("noselect", $boxes[$i]["flags"])) {
+         if (!is_array($boxes[$i]['flags']) ||
+	     !in_array("noselect", $boxes[$i]['flags'])) {
             $box = $boxes[$i]['unformatted'];
             $box2 = replace_spaces($boxes[$i]['unformatted-disp']);
             echo "         <OPTION VALUE=\"$box\">$box2</option>\n";