From 45e7eca2bbcb3bb643893e84bfca0d742854376b Mon Sep 17 00:00:00 2001 From: kink Date: Sat, 24 Mar 2012 10:42:31 +0000 Subject: [PATCH] I believe this code worked by chance, redefining it from string to array and using it outside the code block it was defined in. This should repair it to what was intended. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14291 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index 023401a3..f39956d6 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -1078,18 +1078,19 @@ function sqimap_get_delimiter ($imap_stream = false) { if (preg_match('/\* NAMESPACE +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) *\)|NIL) +(\( *\(.+\) *\)|NIL)/i', $read[0], $data)) { if (preg_match('/^\( *\((.*)\) *\)/', $data[1], $data2)) { $pn = $data2[1]; - } - $pna = explode(')(', $pn); - while (list($k, $v) = each($pna)) { - $lst = explode('"', $v); - if (isset($lst[3])) { - $pn[$lst[1]] = $lst[3]; - } else { - $pn[$lst[1]] = ''; + $pna = explode(')(', $pn); + $delnew = array(); + while (list($k, $v) = each($pna)) { + $lst = explode('"', $v); + if (isset($lst[3])) { + $delnew[$lst[1]] = $lst[3]; + } else { + $delnew[$lst[1]] = ''; + } } + $sqimap_delimiter = array_shift($delnew); } } - $sqimap_delimiter = $pn[0]; } else { fputs ($imap_stream, ". LIST \"INBOX\" \"\"\r\n"); $read = sqimap_read_data($imap_stream, '.', true, $a, $b); -- 2.25.1