From ea3872b0cb6cdfc44c3482169a16c89af9d3b3cd Mon Sep 17 00:00:00 2001 From: BadPixxel Date: Sat, 10 Mar 2018 15:48:40 +0100 Subject: [PATCH] BugFix for PHP7.1: PHP Warning: A non-numeric value encountered in /tmp/Dolibarr/htdocs/product/class/product.class.php on line 1709 --- htdocs/product/class/product.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e6439031146..6e3604a4e68 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1677,7 +1677,7 @@ class Product extends CommonObject return -1; } - if ($newprice!='' || $newprice==0) + if ($newprice !== '' || $newprice === 0) { if ($newpricebase == 'TTC') { @@ -1703,8 +1703,8 @@ class Product extends CommonObject $price_ttc = ( $newnpr != 1 ) ? price2num($newprice) * (1 + ($newvat / 100)) : $price; $price_ttc = price2num($price_ttc,'MU'); - if ($newminprice!='' || $newminprice==0) - { + if ( $newminprice !== '' || $newminprice === 0) + { $price_min = price2num($newminprice,'MU'); $price_min_ttc = price2num($newminprice) * (1 + ($newvat / 100)); $price_min_ttc = price2num($price_min_ttc,'MU');