6.0.0-beta1
8/17/25

[#12682] Horde_Imap_Client_Base::search() does not return 'count' value.
Summary Horde_Imap_Client_Base::search() does not return 'count' value.
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester mrubinsk (at) horde (dot) org
Created 09/13/2013 (4356 days ago)
Due
Updated 12/17/2013 (4261 days ago)
Assigned 09/13/2013 (4356 days ago)
Resolved 09/13/2013 (4356 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/17/2013 11:37:37 AM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit e53dade921dbe5df6064d46e2b2ec820598fea7c
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Fri Sep 13 15:03:28 2013 -0600

     [mms] Ensure Horde_Imap_Client_Base#search() always returns the 
'count' value (Bug #12682).

  .../Imap_Client/lib/Horde/Imap/Client/Base.php     |   10 +++++++---
  framework/Imap_Client/package.xml                  |    2 ++
  2 files changed, 9 insertions(+), 3 deletions(-)

http://git.horde.org/horde-git/-/commit/e53dade921dbe5df6064d46e2b2ec820598fea7c
09/13/2013 09:05:17 PM Michael Slusarz Comment #3
State ⇒ Resolved
Reply to this comment
Horde_Imap_Client 2.15.1.
09/13/2013 09:04:51 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 7e2d1dfc69c9199bcdcf2d62d11edaded3c52fb2
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Fri Sep 13 15:03:28 2013 -0600

     [mms] Ensure Horde_Imap_Client_Base#search() always returns the 
'count' value (Bug #12682).

  .../Imap_Client/lib/Horde/Imap/Client/Base.php     |   10 +++++++---
  framework/Imap_Client/package.xml                  |    2 ++
  2 files changed, 9 insertions(+), 3 deletions(-)

http://git.horde.org/horde-git/-/commit/7e2d1dfc69c9199bcdcf2d62d11edaded3c52fb2
09/13/2013 05:01:32 PM Michael Rubinsky Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Assigned to Michael Slusarz
Queue ⇒ Horde Framework Packages
Summary ⇒ Horde_Imap_Client_Base::search() does not return 'count' value.
Type ⇒ Bug
State ⇒ Assigned
Reply to this comment
phpdoc states that 'count' is always returned in the search results. 
The folllowing example returns 'null' as the value:

<code>
$mbox = new Horde_Imap_Client_Mailbox('INBOX');
$query = new Horde_Imap_Client_Search_Query();
$query->dateSearch(
  new Horde_Date(1379004786),
  Horde_Imap_Client_Search_Query::DATE_SINCE);

$results = $registry->mail->imapOb()->search($mbox, $query, 
array('results' => array(Horde_Imap_Client::SEARCH_RESULTS_MATCH)));

var_dump($results['count']);  // null
var_dump($results['match']->ids); // array containing 51 UIDs that 
matched the search criteria
</code>

Saved Queries