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:
parent
a48c03923f
commit
abf2875eba
@ -742,11 +742,11 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
if ($usercanclose)
|
if ($usercanclose)
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
|
||||||
if ($this->statut == self::STATUS_CLOSED)
|
if ($this->statut == self::STATUS_CLOSED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
$this->db->begin();
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user