forked from Wavyzz/dolibarr
Revert bad practice: setEvent use SESSION. Such usage is limited to HTML
page context and can be used inside any pages. However usage of _SESSION must never be used inside a library (except for function dedicated to HTML page context), and never inside object classes (we must use $this->errors, $this->mesgs or $this->warnings instead).
This commit is contained in:
@@ -2262,7 +2262,8 @@ class Commande extends CommonOrder
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
$this->errors=array($this->db->lasterror());
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::updateline Error=".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
@@ -2271,6 +2272,7 @@ class Commande extends CommonOrder
|
||||
else
|
||||
{
|
||||
$this->error=get_class($this)."::updateline Order status makes operation forbidden";
|
||||
$this->errors=array('OrderStatusMakeOperationForbidden');
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user