Fix determination whether POP3 search query is valid.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Sep 2010 19:44:55 +0000 (13:44 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Sep 2010 19:44:55 +0000 (13:44 -0600)
framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php
framework/Imap_Client/lib/Horde/Imap/Client/Socket/Pop3.php

index 495f818..60de6d0 100644 (file)
@@ -101,8 +101,8 @@ class Horde_Imap_Client_Search_Query
      * 'charset' - (string) The charset of the search string.
      * 'exts' - (array) The list of IMAP extensions used to create the string.
      * 'imap4' - (boolean) True if the search uses IMAP4 criteria (as opposed
-     *           to IMAP2 search criteria)
-     * 'query' - (string) The IMAP search string
+     *           to IMAP2 search criteria).
+     * 'query' - (array) The IMAP search string.
      * </pre>
      * @throws Horde_Imap_Client_Exception
      */
index 6a9535e..076fe2d 100644 (file)
@@ -650,7 +650,7 @@ class Horde_Imap_Client_Socket_Pop3 extends Horde_Imap_Client_Base
             : reset($options['sort']);
 
         // Only support a single query: an ALL search sorted by sequence.
-        if (($options['_query']['query'] != 'ALL') ||
+        if ((reset($options['_query']['query']) != 'ALL') ||
             ($sort &&
              ((count($options['sort']) > 1) ||
               ($sort != Horde_Imap_Client::SORT_SEQUENCE)))) {