Timesheet: Avoid error if selectcols is not an array

in_array(): Argument #2 ($haystack) must be of type array, null given
This commit is contained in:
nathan 2023-01-02 08:30:35 -07:00
parent fefe82162e
commit 82ae5aa939

View File

@ -907,7 +907,7 @@ class timesheet_ui extends timesheet_bo
if ($query['selectcols'] && in_array('ts_unitprice', $query['selectcols'])===false) $rows['no_ts_unitprice'] = 1;
if ($query['selectcols'] && in_array('ts_total_price',$query['selectcols'])===false) $rows['no_ts_total'] = 1;
}
$rows['no_ts_status'] = in_array('ts_status', $query['selectcols']) === false && !$this->config_data['history'] ||
$rows['no_ts_status'] = is_array($query['selectcols']) && in_array('ts_status', $query['selectcols']) === false && !$this->config_data['history'] ||
$query['no_status'];
if ($query['search'])