From bf23efda21cca7bd24da46c4ed451c80316a97bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Apr 2013 09:17:03 +0200 Subject: [PATCH] Fix: Bad error management --- htdocs/societe/class/societe.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 37b81403acd..205e88c8272 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -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;