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:
Morris Jobke 2014-11-11 12:15:30 +01:00
parent 9368de5a8b
commit 081787d6ae
1 changed files with 1 additions and 1 deletions

View File

@ -928,7 +928,7 @@ class Access extends LDAPUtility implements user\IUserTools {
foreach($searchResults as $res) {
$count = intval($this->ldap->countEntries($cr, $res));
$counter += $count;
if($count === $limit) {
if($count > 0 && $count === $limit) {
$hasHitLimit = true;
}
}