diff --git a/htdocs/lib/mysql.lib.php b/htdocs/lib/mysql.lib.php index 36add016016..1d4675e0222 100644 --- a/htdocs/lib/mysql.lib.php +++ b/htdocs/lib/mysql.lib.php @@ -346,7 +346,7 @@ class DoliDb function rollback() { - if ($this->transaction_opened) + if ($this->transaction_opened==1) { $ret=$this->query("ROLLBACK"); $this->transaction_opened=0; diff --git a/htdocs/lib/pgsql.lib.php b/htdocs/lib/pgsql.lib.php index fe4899db1c0..b206a533088 100644 --- a/htdocs/lib/pgsql.lib.php +++ b/htdocs/lib/pgsql.lib.php @@ -326,7 +326,7 @@ class DoliDb */ function rollback() { - if ($this->transaction_opened) + if ($this->transaction_opened==1) { $ret=$this->query("ROLLBACK;"); $this->transaction_opened=0;