Skip to content

Commit

Permalink
fix: avoid php8 warning/error on failed notification
Browse files Browse the repository at this point in the history
  • Loading branch information
FHenry committed Jan 9, 2025
1 parent 441b8d0 commit 0295699
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf
$notify = new Notify($this->db);
$resultSend = $notify->send($action, $object);
if ($resultSend < 0) {
if (!isset($this->errors)) {
$this->errors = [];
}
$this->errors = array_merge($this->errors, $notify->errors);
return $resultSend;
}
Expand Down

0 comments on commit 0295699

Please sign in to comment.