From 10855ef0aa08dbc44ea35e23e5f519246dcc6499 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 2 Jan 2023 08:30:35 -0700 Subject: [PATCH] Timesheet: Avoid error if selectcols is not an array in_array(): Argument #2 ($haystack) must be of type array, null given --- timesheet/inc/class.timesheet_ui.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 7ed7ca7c4b..56d1cba4be 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -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'])