浏览代码

A couple of fixes for PHP 4.3.x. This should allow prefs to be saved now,
and should remove the warning about a bug in PHP 4.2.3 in the mailbox view.

Thank you very much Troy Settle for use of his server for testing

jangliss 22 年之前
父节点
当前提交
4e0abba1b1
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      functions/mailbox_display.php

+ 10 - 0
functions/mailbox_display.php

@@ -352,6 +352,16 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
     global $msgs, $msort, $auto_expunge, $thread_sort_messages,
            $allow_server_sort, $server_sort_order;
 
+    /*
+     * For some reason, on PHP 4.3+, this being unset, and set in the session causes havoc
+     * so setting it to an empty array beforehand seems to clean up the issue, and stopping the
+     * "Your script possibly relies on a session side-effect which existed until PHP 4.2.3" error
+     */
+
+    if (!isset($msort)) {
+        $msort = array();
+    }
+
     $start = microtime();
     /* If autoexpunge is turned on, then do it now. */
     $mbxresponse = sqimap_mailbox_select($imapConnection, $mailbox);