A couple of fixes for PHP 4.3.x. This should allow prefs to be saved now,
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 25 Mar 2003 15:08:23 +0000 (15:08 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 25 Mar 2003 15:08:23 +0000 (15:08 +0000)
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

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4675 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index 6f8a248658ec209e21ffe749016366948d8abaef..c10f13e358f34b9c5814cfc129dbb709fa758e7e 100644 (file)
@@ -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);