From 94f6b8ce6ca5043b9f4cd32cf9e4ddb080aa71c7 Mon Sep 17 00:00:00 2001 From: jyhere Date: Fri, 12 Apr 2024 12:21:03 +0200 Subject: [PATCH] FIX : db transaction not rolled back if Product::setMultilangs() returns an error (#29332) --- htdocs/product/class/product.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 479d6b9e6b2..47e83839598 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1329,6 +1329,7 @@ class Product extends CommonObject if (getDolGlobalInt('MAIN_MULTILANGS')) { if ($this->setMultiLangs($user) < 0) { $this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql; + $this->db->rollback(); return -2; } }