From 5c54d5d279abb46808992bc70adbdf6a29470d17 Mon Sep 17 00:00:00 2001 From: jyhere Date: Thu, 13 Apr 2023 16:55:00 +0200 Subject: [PATCH] FIX check on wrong variable, some unnecessary code removed --- htdocs/product/class/productcustomerprice.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 6a6fe72a08a..39adc8cd598 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -871,7 +871,7 @@ class Productcustomerprice extends CommonObject $prodsocpriceupd->recuperableonly = $this->recuperableonly; $resultupd = $prodsocpriceupd->update($user, 0, $forceupdateaffiliate); - if ($result < 0) { + if ($resultupd < 0) { $error++; $this->error = $prodsocpriceupd->error; } @@ -889,7 +889,7 @@ class Productcustomerprice extends CommonObject $prodsocpricenew->recuperableonly = $this->recuperableonly; $resultupd = $prodsocpricenew->create($user, 0, $forceupdateaffiliate); - if ($result < 0) { + if ($resultupd < 0) { $error++; $this->error = $prodsocpricenew->error; } @@ -923,7 +923,7 @@ class Productcustomerprice extends CommonObject $this->db->begin(); - if (!$error && !$notrigger) { + if (!$notrigger) { $result = $this->call_trigger('PRODUCT_CUSTOMER_PRICE_DELETE', $user); if ($result < 0) { $error++;