From ff3707b6501f4325d4b27f885e6247d5bbd69fb0 Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Mon, 8 Feb 2021 17:24:40 +0100 Subject: [PATCH] FIX: warning when adding a line if $remise_percent is an empty string --- htdocs/commande/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 36f9705aabc..773d5283ede 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -672,6 +672,7 @@ if (empty($reshook)) $qty = price2num(GETPOST('qty'.$predef, 'alpha')); $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0); + if ($remise_percent === '') $remise_percent = 0; // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);