2
0
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:
Laurent Destailleur
2012-07-29 14:15:29 +02:00
parent 0ee08418cc
commit d6a5b224fb
8 changed files with 17 additions and 8 deletions

View File

@@ -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;
}
}