1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Author: Guido Berhoerster <guido+debian@berhoerster.name>
Description: Fix LDAP fetch in case of empty results
If the LDAP\Result is empty ldap_first_entry() returns false which is stored
in $this->re[$srp]. Any subsequent calls to fetch will pass this as an argument
to ldap_next_entry() which will throw an exception. Fix this by checking for a
falsy value.
--- gosa.orig/include/class_ldap.inc
+++ gosa/include/class_ldap.inc
@@ -440,7 +440,7 @@ class LDAP
} else {
return array();
}
- } else {
+ } else if ($this->re[$srp]) {
$this->re[$srp]= @ldap_next_entry(self::$cid, $this->re[$srp]);
}
if ($this->re[$srp])
|