From d754283878a277a733ea552fa4b37191c5c737ee Mon Sep 17 00:00:00 2001 From: stekkel Date: Fri, 14 May 2004 19:12:53 +0000 Subject: [PATCH] second try .. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7459 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index b67093d5..73f6d619 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -469,13 +469,17 @@ function sqimap_retrieve_imap_response($imap_stream, $tag, $handle_errors, } // end while /* error processing in case $read is false */ - if ($read === false && $handle_errors) { + if ($read === false) { // try to retrieve an untagged bye respons from the results $sResponse = array_pop($data); - if ($sResponse != NULL && strpos($sResponse,'* BYE')) { - $message[$tag] = substr($sResponse,5); - $response[$tag] = 'BYE'; - } else { + if ($sResponse !== NULL && strpos($sResponse,'* BYE') !== false) { + if (!$handle_errors) { + $query = ''; + } + sqimap_error_box(_("ERROR : Imap server closed the connection."), $query, _("Server responded:"),$sResponse); + echo ''; + exit; + } else if ($handle_errors) { unset($data); sqimap_error_box(_("ERROR : Connection dropped by imap-server."), $query); exit; -- 2.25.1