diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index b9a009f7c0a..8fceee8e47a 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -94,7 +94,11 @@ class InterfaceNotification extends DolibarrTriggers dol_syslog("Trigger '".$this->name."' for action '".$action."' launched by ".__FILE__.". id=".$object->id); $notify = new Notify($this->db); - $notify->send($action, $object); + $resultSend = $notify->send($action, $object); + if ($resultSend < 0) { + $this->errors = array_merge($this->errors, $notify->errors); + return $resultSend; + } return 1; }