Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix zero length limit.
James Colebcdc562bf7f5
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.phpindex 612f3d0049..cf20585286 100644--- a/app/Helpers/Collector/GroupCollector.php+++ b/app/Helpers/Collector/GroupCollector.php@@ -190,7 +190,9 @@ class GroupCollector implements GroupCollectorInterfacepublic function getPaginatedGroups(): LengthAwarePaginator{$set = $this->getGroups();-+ if(0===$this->limit) {+ $this->setLimit(50);+ }return new LengthAwarePaginator($set, $this->total, $this->limit, $this->page);}diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.phpindex 1f6ee522b0..446217f028 100644--- a/app/Support/Search/OperatorQuerySearch.php+++ b/app/Support/Search/OperatorQuerySearch.php@@ -192,7 +192,7 @@ class OperatorQuerySearch implements SearchInterfacepublic 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();}