fix PHP 8.0 TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given

This commit is contained in:
Ralf Becker 2021-11-14 10:32:22 +01:00
parent 7d49599943
commit 5de3115500

View File

@ -678,7 +678,7 @@ class calendar_ui
'filter' => $this->cal_prefs['saved_states']['status_filter'], 'filter' => $this->cal_prefs['saved_states']['status_filter'],
'num_rows' => 1 'num_rows' => 1
); );
$filter_match = count($this->bo->search($filter_check, $this->bo->so->cal_table.".cal_id = {$event['id']}")) > 0; $filter_match = (bool)$this->bo->search($filter_check, $this->bo->so->cal_table.".cal_id = {$event['id']}");
} }
if(!$event || !$filter_match) if(!$event || !$filter_match)