From f14de50bd787a932c9a15eced029467322395292 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 13 Oct 2021 14:26:43 +0200 Subject: [PATCH] FIX check if numeric value --- htdocs/core/lib/invoice.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 7c0dbbd084c..573f27c1eee 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -519,8 +519,10 @@ function getNumberInvoicesPieChart($mode) $i++; } if (!empty($dataseries[0])) { - foreach ($dataseries[0] as $key=>$value) { - $total += $value; + foreach ($dataseries[0] as $key => $value) { + if (is_numeric($value)) { + $total += $value; + } } } $legend = array(