[Pkg-owncloud-commits] [owncloud] 02/74: Fix infinite loop if count and limit is 0

David Prévot taffit at moszumanska.debian.org
Tue Dec 2 22:04:32 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit f52662ab26664ac9bf29ac557089884913fa5cbf
Author: Morris Jobke <hey at morrisjobke.de>
Date:   Tue Nov 11 12:15:30 2014 +0100

    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
---
 apps/user_ldap/lib/access.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 44162e3..a2ca16d 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;
 			}
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list