FIX : db transaction not rolled back if Product::setMultilangs() returns an error (#29332)

This commit is contained in:
jyhere 2024-04-12 12:21:03 +02:00 committed by GitHub
parent c58e6f7373
commit 94f6b8ce6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}
}