diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-01-11 14:47:51 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-01-11 14:47:51 +0100 |
commit | 9031ae02816d5cf357fce714909ea8ca8d3b8066 (patch) | |
tree | 58c49de99e7ef387fc9ecce01d6c36c53947a698 /apps/user_ldap | |
parent | 15a3f4659f7e6a84039cd8ef859d1dfb3eaedf9a (diff) | |
download | nextcloud-server-9031ae02816d5cf357fce714909ea8ca8d3b8066.tar.gz nextcloud-server-9031ae02816d5cf357fce714909ea8ca8d3b8066.zip |
fix return value when ldapPagingSize returns null
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/lib/Jobs/Sync.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/tests/Jobs/SyncTest.php | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/Jobs/Sync.php b/apps/user_ldap/lib/Jobs/Sync.php index dc8a14d111b..0cc0be7d3ca 100644 --- a/apps/user_ldap/lib/Jobs/Sync.php +++ b/apps/user_ldap/lib/Jobs/Sync.php @@ -176,10 +176,10 @@ class Sync extends TimedJob { true ); - if($connection->ldapPagingSize === 0) { + if((int)$connection->ldapPagingSize === 0) { return false; } - return count($results) >= $connection->ldapPagingSize; + return count($results) >= (int)$connection->ldapPagingSize; } /** diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php index c6cb9549b07..75ffd0e8280 100644 --- a/apps/user_ldap/tests/Jobs/SyncTest.php +++ b/apps/user_ldap/tests/Jobs/SyncTest.php @@ -159,7 +159,8 @@ class SyncTest extends TestCase { [ 3, 3, true ], [ 3, 5, true ], [ 3, 2, false], - [ 0, 4, false] + [ 0, 4, false], + [ null, 4, false] ]; } |