diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 8368bffbab2..82ca1669384 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -412,18 +412,28 @@ if (!empty($filter_op2) && $filter_op2 != -1) { if (!empty($filter_opcloture) && $filter_opcloture != -1) { $param .= '&filter_opcloture='.urlencode($filter_opcloture); } +//removing PHP warnings +$filter_dateouvertureprevue = isset($filter_dateouvertureprevue) ? $filter_dateouvertureprevue : '' ; if ($filter_dateouvertureprevue != '') { $param .= '&opouvertureprevueday='.$opouvertureprevueday.'&opouvertureprevuemonth='.$opouvertureprevuemonth.'&opouvertureprevueyear='.$opouvertureprevueyear; } +//removing PHP warnings +$filter_date1 = isset($filter_date1) ? $filter_date1 : ''; if ($filter_date1 != '') { $param .= '&op1day='.$op1day.'&op1month='.$op1month.'&op1year='.$op1year; } +//removing PHP8 warnings +$filter_date2 = isset($filter_date2) ? $filter_date2 : ''; if ($filter_date2 != '') { $param .= '&op2day='.$op2day.'&op2month='.$op2month.'&op2year='.$op2year; } +//removing PHP8 warnings +$filter_datecloture = isset($filter_datecloture) ? $filter_datecloture : ''; if ($filter_datecloture != '') { $param .= '&opclotureday='.$op2day.'&opcloturemonth='.$op2month.'&opclotureyear='.$op2year; } +//removing PHP8 warnings +$optioncss = isset($optioncss) ? $optioncss : ''; if ($optioncss != '') { $param .= '&optioncss='.$optioncss; } @@ -467,7 +477,8 @@ if ($mode == "5") { print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contract', 0, '', '', $limit); -if ($sall) { +//adding isset to remove PHP8 warnings +if (isset($sall)) { foreach ($fieldstosearchall as $key => $val) { $fieldstosearchall[$key] = $langs->trans($val); } @@ -475,6 +486,8 @@ if ($sall) { } $morefilter = ''; +//removing PHP8 warnings +$moreforfilter = ''; // If the user can view categories of products if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) {