From b7277e4f6c0705fd2322fb369bf7af375e9921c7 Mon Sep 17 00:00:00 2001 From: stekkel Date: Sun, 29 Jun 2003 10:51:31 +0000 Subject: [PATCH] return the result in case of pipelined responses git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5158 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_general.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions/imap_general.php b/functions/imap_general.php index 61cefde0..fb62ebd1 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -109,12 +109,17 @@ function sqimap_run_pipelined_command ($imap_stream, $aQuery, $handle_errors, $handle_errors, $response, $message, $query, $filter,$outputstream,$no_return); foreach ($aReturnedResponse as $returned_tag => $aResponse) { - $aResults[$returned_tag] = $aResponse; + if (!empty($aResponse)) { + $aResults[$returned_tag] = $aResponse[0]; + } else { + $aResults[$returned_tag] = $aResponse; + } $aServerResponse[$returned_tag] = $response[$returned_tag]; $aServerMessage[$returned_tag] = $message[$returned_tag]; } } } + return $aResults; } /* @@ -381,7 +386,7 @@ function sqimap_read_data_list ($imap_stream, $tag, $handle_errors, break 3; /* while switch while */ } $data[] = $sLiteral; - $fetch_data[] = sqimap_fgets($imap_stream); + $data[] = sqimap_fgets($imap_stream); } else { $data[] = $read; } -- 2.25.1