From 35314c5c957161a477f8f434a00dfd14edfa49b2 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 2 Mar 2004 21:05:57 +0000 Subject: [PATCH] unsetting an array element didn't re-index the array which caused a failure when we added the INBOX response to the array at a later stage. This is confirmed on PHP 4.1.2. The version I'm using (4.3.4) didn't had that problem. Probably this fix us a php-bug workaround. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6732 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index a5a6277c..3e14e7c3 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -823,6 +823,9 @@ function sqimap_mailbox_tree($imap_stream) { // remove the result and request it again with a list // response at a later stage. unset($lsub_ary[$i]); + // re-index the array otherwise the addition of the LIST + // response will fail in PHP 4.1.2 and probably other older versions + $lsub_ary = array_values($lsub_ary); } break; } -- 2.25.1