var count is assigned in the inner loop so it must be checked inside there to be properly used as part of the exit condition of the outer loop

This commit is contained in:
Arthur Schiwon 2014-03-20 10:59:58 +01:00
parent 43402c56dd
commit bdc418d1f9
1 changed files with 5 additions and 1 deletions

View File

@ -786,6 +786,7 @@ class Access extends LDAPUtility {
$cr = $this->connection->getConnectionResource();
do {
$continue = false;
$search = $this->executeSearch($filter, $base, $attr,
$limit, $offset);
if($search === false) {
@ -798,12 +799,15 @@ class Access extends LDAPUtility {
if($count !== false) {
$counter += $count;
}
if($count === $limit) {
$continue = true;
}
}
$this->processPagedSearchStatus($sr, $filter, $base, $count, $limit,
$offset, $pagedSearchOK, $skipHandling);
$offset += $limit;
} while($count === $limit);
} while($continue);
return $counter;
}