From: Jan Schneider Date: Fri, 25 Sep 2009 14:04:49 +0000 (+0200) Subject: MFB: Don't return an error on empty LDAP search results (Bug #8595). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9f18210886cb226b13faeaeecd7f02a40091282a;p=horde.git MFB: Don't return an error on empty LDAP search results (Bug #8595). --- 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))); }