From 6a23c6265e7b33ea893a9ef899df86c18792fdd0 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 20 Jun 2022 04:24:32 +0200 Subject: [PATCH] Fix PHP8 --- htdocs/salaries/list.php | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 957e76ac440..e578e8e0d02 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -1,8 +1,8 @@ - * Copyright (C) 2015-2016 Laurent Destailleur - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2021 Gauthier VERDOL +/* Copyright (C) 2011-2022 Alexandre Spangaro + * Copyright (C) 2015-2016 Laurent Destailleur + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2021 Gauthier VERDOL * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -90,22 +90,10 @@ $search_date_end_to = dol_mktime(23, 59, 59, GETPOST('search_date_end_tomonth', $search_amount = GETPOST('search_amount', 'alpha'); $search_account = GETPOST('search_account', 'int'); $search_status = GETPOST('search_status', 'int'); +$search_type_id = GETPOST('search_type_id', 'int'); $filtre = GETPOST("filtre", 'restricthtml'); -if (!GETPOST('search_type_id', 'int')) { - $newfiltre = str_replace('filtre=', '', $filtre); - $filterarray = explode('-', $newfiltre); - foreach ($filterarray as $val) { - $part = explode(':', $val); - if ($part[0] == 's.fk_typepayment') { - $search_type_id = $part[1]; - } - } -} else { - $search_type_id = GETPOST('search_type_id', 'int'); -} - $childids = $user->getAllChildIds(1); // Initialize array of search criterias @@ -519,6 +507,9 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar $i = 0; $total = 0; $totalarray = array(); +$totalarray['nbfield'] = 0; +$totalarray['val'] = array(); +$totalarray['val']['totalttcfield'] = 0; while ($i < ($limit ? min($num, $limit) : $num)) { $obj = $db->fetch_object($resql); if (empty($obj)) {