From 80ee6c813c0b3418bdd4a4ef06ab372077220abb Mon Sep 17 00:00:00 2001 From: PsyCrow <93346975+PsyCrow-code@users.noreply.github.com> Date: Fri, 26 Apr 2024 15:50:54 -0600 Subject: [PATCH] FIX PHP Warning: Undefined array key "totalam" on line 1891 (#29487) FIX PHP Warning: Undefined array key "totalam" on line 1891 --- htdocs/fourn/facture/list.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index d3d60c970f837..ebb7c98bb9260 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1885,6 +1885,9 @@ $totalarray['nbfield']++; $totalarray['pos'][$totalarray['nbfield']] = 'totalam'; } + if (empty($totalarray['val']['totalam'])) { + $totalarray['val']['totalam'] = 0; // avoid PHP Warning: Undefined array key "totalam" on line 1891 + } $totalarray['val']['totalam'] += $totalpay; }