fix PHP Warning count(): Parameter must be an array or an object that implements Countable

This commit is contained in:
Ralf Becker 2021-10-11 13:58:33 +02:00
parent 3e17b79d5c
commit 90ab703a14

View File

@ -451,7 +451,7 @@ class timesheet_bo extends Api\Storage
{ {
$extra_cols[] = $total_sql.' AS ts_total'; $extra_cols[] = $total_sql.' AS ts_total';
} }
if (!isset($filter['ts_owner']) || !count($filter['ts_owner'])) if (!isset($filter['ts_owner']) || !count((array)$filter['ts_owner']))
{ {
$filter['ts_owner'] = array_keys($this->grants); $filter['ts_owner'] = array_keys($this->grants);
} }