Skip to content

Commit

Permalink
Merge pull request Dolibarr#32555 from FHenry/20.0_fix_catching_error…
Browse files Browse the repository at this point in the history
…_on_Notification

fix: manage error in Notification trigger
  • Loading branch information
eldy authored Jan 7, 2025
2 parents 5a5c9db + 1d8f9fd commit 973b6b8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
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;
}
Expand Down

0 comments on commit 973b6b8

Please sign in to comment.