mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix zero length limit.
This commit is contained in:
parent
171f8c5848
commit
bcdc562bf7
@ -190,7 +190,9 @@ class GroupCollector implements GroupCollectorInterface
|
||||
public function getPaginatedGroups(): LengthAwarePaginator
|
||||
{
|
||||
$set = $this->getGroups();
|
||||
|
||||
if(0===$this->limit) {
|
||||
$this->setLimit(50);
|
||||
}
|
||||
return new LengthAwarePaginator($set, $this->total, $this->limit, $this->page);
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
public function searchTransactions(): LengthAwarePaginator
|
||||
{
|
||||
if (0 === count($this->getWords()) && 0 === count($this->getOperators())) {
|
||||
throw new FireflyException('Search query is empty.');
|
||||
return new LengthAwarePaginator;
|
||||
}
|
||||
return $this->collector->getPaginatedGroups();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user