From 167d74283f3a6e6eb4a54ee5b937a496158ce07e Mon Sep 17 00:00:00 2001 From: jangliss Date: Tue, 25 Mar 2003 15:08:23 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4675 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 6f8a2486..c10f13e3 100644 --- a/functions/mailbox_display.php +++ b/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); -- 2.25.1