return the result in case of pipelined responses
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 29 Jun 2003 10:51:31 +0000 (10:51 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 29 Jun 2003 10:51:31 +0000 (10:51 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5158 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_general.php

index 61cefde09b8d3fafec2bbccccf1cf8f5d378db99..fb62ebd1773682c06f9ef805b94ca978e5818bbd 100755 (executable)
@@ -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;
                     }