From 1855c790ba0efbc5b666651d56c668538447a3b4 Mon Sep 17 00:00:00 2001 From: stekkel Date: Wed, 14 Aug 2002 12:10:17 +0000 Subject: [PATCH] Fix for broken imap-servers with a missing UIDNEXT Value. Thnx Thijs Kinkhorst for solving this issue. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3300 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_messages.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 838245f3..fd592a2b 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -184,7 +184,11 @@ function sqimap_get_php_sort_order ($imap_stream, $mbxresponse) { $php_sort_array = array(); if ($uid_support) { - $uidnext = $mbxresponse['UIDNEXT']-1; + if (isset($mbxresponse['UIDNEXT']) && $mbxresponse['UIDNEXT']) { + $uidnext = $mbxresponse['UIDNEXT']-1; + } else { + $uidnext = '*'; + } $uid_query = "$sid SEARCH UID 1:$uidnext\r\n"; fputs($imap_stream, $uid_query); $uids = sqimap_read_data($imap_stream, $sid, true ,&$response, $message); -- 2.25.1