Skip to content

Commit

Permalink
fix(View): column might be saved as null
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Jul 12, 2024
1 parent 6a22984 commit 42697c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Db/Row2Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ private function getFilterGroups(IQueryBuilder &$qb, array $filters): array {
private function getFilter(IQueryBuilder &$qb, array $filterGroup): array {
$filterExpressions = [];
foreach ($filterGroup as $filter) {
if ($filter['columnId'] === null) {
// a filter(group) was stored with a not-selected column. Skip,
// otherwise it breaks impressively.
continue;
}

$columnId = $filter['columnId'];
// Fail if the filter is for a column that is not in the list and no meta column
if (!isset($this->columns[$columnId]) && !isset($this->allColumns[$columnId]) && $columnId > 0) {
Expand Down

0 comments on commit 42697c6

Please sign in to comment.