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 5d41e69833
commit 10855ef0aa

View File

@ -862,7 +862,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'])