From 9f18210886cb226b13faeaeecd7f02a40091282a Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 25 Sep 2009 16:04:49 +0200 Subject: [PATCH] MFB: Don't return an error on empty LDAP search results (Bug #8595). --- turba/docs/CHANGES | 3 ++- turba/lib/Driver/Ldap.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/turba/docs/CHANGES b/turba/docs/CHANGES index 9ee0399a6..8f34b0c84 100644 --- a/turba/docs/CHANGES +++ b/turba/docs/CHANGES @@ -12,7 +12,8 @@ v3.0-git v2.3.3-cvs ---------- - +[jan] Don't return an error on empty LDAP search results (Bug #8595). +[jan] Replace PHP5-only code from the LDIF exporter (Bug #8586). ------ diff --git a/turba/lib/Driver/Ldap.php b/turba/lib/Driver/Ldap.php index 235fa45ad..9a15a8789 100644 --- a/turba/lib/Driver/Ldap.php +++ b/turba/lib/Driver/Ldap.php @@ -483,7 +483,8 @@ class Turba_Driver_Ldap extends Turba_Driver */ function _getResults($fields, $res) { - if (!($entries = @ldap_get_entries($this->_ds, $res))) { + $entries = @ldap_get_entries($this->_ds, $res); + if ($entries === false) { return PEAR::raiseError(sprintf(_("Read failed: (%s) %s"), ldap_errno($this->_ds), ldap_error($this->_ds))); } -- 2.11.0