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) {