Fix: Bad error management

This commit is contained in:
Laurent Destailleur 2013-04-04 09:17:03 +02:00
parent e06e0127af
commit bf23efda21

View File

@ -249,7 +249,11 @@ class Societe extends CommonObject
$result=$interface->run_triggers('COMPANY_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
else $error++;
if (! $error)
{
dol_syslog(get_class($this)."::Create success id=".$this->id);
$this->db->commit();
return $this->id;