From 144ed48fcb75e5725803d24e12e7b417b9dba40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 18 Feb 2024 15:24:14 +0100 Subject: [PATCH] fix warning in list_print_total.tpl.php (#28233) * fix warning in list_print_total.tpl.php * Update list.php --- htdocs/commande/list.php | 28 ++++++++++++------------ htdocs/core/tpl/list_print_total.tpl.php | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index a7fd4dc433e..d471e9d7ca4 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -2446,7 +2446,7 @@ while ($i < $imaxinloop) { $userstatic->lastname = $obj->lastname; $userstatic->firstname = $obj->firstname; $userstatic->email = $obj->user_email; - $userstatic->statut = $obj->user_statut; + $userstatic->status = $obj->user_statut; $userstatic->entity = $obj->entity; $userstatic->photo = $obj->photo; $userstatic->office_phone = $obj->office_phone; @@ -2773,10 +2773,10 @@ while ($i < $imaxinloop) { $i++; } - // Show total line - include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; - // If no record found +// If no record found if ($num == 0) { $colspan = 1; foreach ($arrayfields as $key => $val) { @@ -2787,16 +2787,16 @@ if ($num == 0) { print ''.$langs->trans("NoRecordFound").''; } - $db->free($resql); +$db->free($resql); - $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; +$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; - print ''."\n"; - print ''."\n"; +print ''."\n"; +print ''."\n"; - print ''."\n"; +print ''."\n"; if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { $hidegeneratedfilelistifempty = 1; @@ -2815,6 +2815,6 @@ if (in_array('builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords print $formfile->showdocuments('massfilesarea_orders', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); } - // End of page - llxFooter(); - $db->close(); +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/core/tpl/list_print_total.tpl.php b/htdocs/core/tpl/list_print_total.tpl.php index 970eb93c84d..e8fb9978be6 100644 --- a/htdocs/core/tpl/list_print_total.tpl.php +++ b/htdocs/core/tpl/list_print_total.tpl.php @@ -15,7 +15,7 @@ if (isset($totalarray['pos'])) { while ($i < $totalarray['nbfield']) { $i++; if (!empty($totalarray['pos'][$i])) { - printTotalValCell($totalarray['type'][$i], $totalarray['val'][$totalarray['pos'][$i]]); + printTotalValCell($totalarray['type'][$i] ?? '', $totalarray['val'][$totalarray['pos'][$i]]); } else { if ($i == 1) { if (is_null($limit) || $num < $limit) {