From: Morris Jobke Date: Tue, 11 Nov 2014 11:15:30 +0000 (+0100) Subject: Fix infinite loop if count and limit is 0 X-Git-Tag: v7.0.4RC1~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f52662ab26664ac9bf29ac557089884913fa5cbf;p=nextcloud-server.git 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 --- diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 44162e32d47..a2ca16dcda3 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -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; } }