- Fixed a bug which caused a problem using offset without limits

This commit is contained in:
Dave Mc Nicoll 2023-11-01 11:25:59 -04:00
parent 8e0dce3e71
commit d297fd9e86
1 changed files with 5 additions and 0 deletions

View File

@ -259,6 +259,11 @@ class QueryBuilder implements Query\QueryBuilderInterface
if ( null === $offset = $this->getFragment(Query\Offset::class) ) {
$offset = new Query\Offset();
$this->push($offset);
# A limit is required to match an offset
if ( null === $limit = $this->getFragment(Query\Limit::class) ) {
$this->limit(\PHP_INT_MAX);
}
}
$offset->set($value);