Ver código fonte

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

Tyler Akins 24 anos atrás
pai
commit
ae170e7286
1 arquivos alterados com 2 adições e 1 exclusões
  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";