Browse Source

fix return value when ldapPagingSize returns null

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
tags/v13.0.0RC1
Arthur Schiwon 6 years ago
parent
commit
9031ae0281
No account linked to committer's email address
2 changed files with 4 additions and 3 deletions
  1. 2
    2
      apps/user_ldap/lib/Jobs/Sync.php
  2. 2
    1
      apps/user_ldap/tests/Jobs/SyncTest.php

+ 2
- 2
apps/user_ldap/lib/Jobs/Sync.php View File

@@ -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;
}

/**

+ 2
- 1
apps/user_ldap/tests/Jobs/SyncTest.php View File

@@ -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]
];
}


Loading…
Cancel
Save