git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7458
7612ce4b-ef26-0410-bec9-
ea0150e637f0
} // end while
/* error processing in case $read is false */
- if ($read === false) {
- unset($data);
- if ($handle_errors) {
+ if ($read === false && $handle_errors) {
+ // 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 {
+ unset($data);
sqimap_error_box(_("ERROR : Connection dropped by imap-server."), $query);
exit;
}