]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix infinite loop if count and limit is 0
authorMorris Jobke <hey@morrisjobke.de>
Tue, 11 Nov 2014 11:15:30 +0000 (12:15 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Tue, 11 Nov 2014 12:39:48 +0000 (13:39 +0100)
* otherwise it will always think it hits the limit and need another round to fetch additional results

apps/user_ldap/lib/access.php

index 44162e32d47044e598e1f4d537db5c853c369417..a2ca16dcda337e05a1b7647c3e9d59424eee4917 100644 (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;
                        }
                }