From 5101555251c4d4449ec5c4938ebfc3e8f1aa0df9 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 12 Jul 2024 17:24:24 +0200 Subject: [PATCH] fix(View): column might be saved as null Signed-off-by: Arthur Schiwon --- lib/Db/Row2Mapper.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Db/Row2Mapper.php b/lib/Db/Row2Mapper.php index 06deb17cf..e48bd2771 100644 --- a/lib/Db/Row2Mapper.php +++ b/lib/Db/Row2Mapper.php @@ -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) {