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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user