Skip to content

Commit

Permalink
Merge pull request #15864 from cakephp/paginator
Browse files Browse the repository at this point in the history
Remove redundant condition.
  • Loading branch information
othercorey committed Sep 9, 2021
2 parents 48735ff + e0904ab commit e071530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Datasource/Paginator.php
Expand Up @@ -669,7 +669,7 @@ protected function _prefix(RepositoryInterface $object, array $order, bool $allo
public function checkLimit(array $options): array
{
$options['limit'] = (int)$options['limit'];
if (empty($options['limit']) || $options['limit'] < 1) {
if ($options['limit'] < 1) {
$options['limit'] = 1;
}
$options['limit'] = max(min($options['limit'], $options['maxLimit']), 1);
Expand Down

0 comments on commit e071530

Please sign in to comment.