Fix infinite loop if count and limit is 0
* otherwise it will always think it hits the limit and need another round to fetch additional results
This commit is contained in:
parent
9368de5a8b
commit
081787d6ae
|
@ -928,7 +928,7 @@ class Access extends LDAPUtility implements user\IUserTools {
|
||||||
foreach($searchResults as $res) {
|
foreach($searchResults as $res) {
|
||||||
$count = intval($this->ldap->countEntries($cr, $res));
|
$count = intval($this->ldap->countEntries($cr, $res));
|
||||||
$counter += $count;
|
$counter += $count;
|
||||||
if($count === $limit) {
|
if($count > 0 && $count === $limit) {
|
||||||
$hasHitLimit = true;
|
$hasHitLimit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue