MFB: Don't return an error on empty LDAP search results (Bug #8595).
authorJan Schneider <jan@horde.org>
Fri, 25 Sep 2009 14:04:49 +0000 (16:04 +0200)
committerJan Schneider <jan@horde.org>
Fri, 25 Sep 2009 14:04:49 +0000 (16:04 +0200)
turba/docs/CHANGES
turba/lib/Driver/Ldap.php

index 9ee0399..8f34b0c 100644 (file)
@@ -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).
 
 
 ------
index 235fa45..9a15a87 100644 (file)
@@ -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)));
         }