From 05fbb7257c9ffb2eeffaa595323a3c2eed6ff691 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 19 Mar 2024 15:33:26 +0100 Subject: [PATCH] Fix arg type to preg_replace() with cast --- htdocs/contrat/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 4d411b5a2b9..5877525b7fe 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -546,7 +546,7 @@ if (empty($reshook)) { } $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); - $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); + $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', (string) $prod->tva_tx)); // Set unit price to use if (!empty($price_ht) || $price_ht === '0') {