2
0
forked from Wavyzz/dolibarr

commande.class.php - move db->begin() into cloture

A DB begin request was sent before executing the status guard. If the guard fails, we exited the method without closing it. And it will occur a bug to any further database operation.
This commit is contained in:
LAURIER Alexis
2021-02-09 14:25:45 +01:00
committed by GitHub
parent a48c03923f
commit abf2875eba

View File

@@ -742,11 +742,11 @@ class Commande extends CommonOrder
if ($usercanclose)
{
$this->db->begin();
if ($this->statut == self::STATUS_CLOSED)
{
return 0;
}
$this->db->begin();
$now = dol_now();