fix return value when ldapPagingSize returns null

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2018-01-11 14:47:51 +01:00
parent 15a3f4659f
commit 9031ae0281
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 4 additions and 3 deletions

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;
}
/**

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