From e3d66c2cc6dc091a1799032037593d535fc1e305 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 8 May 2024 08:36:43 +0200 Subject: [PATCH] fix PHP error in tracking, if no links given (e.g. in filemanager notifications) --- api/src/Storage/Tracking.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/src/Storage/Tracking.php b/api/src/Storage/Tracking.php index 234800ef6c..45d1fa91f6 100644 --- a/api/src/Storage/Tracking.php +++ b/api/src/Storage/Tracking.php @@ -842,8 +842,11 @@ abstract class Tracking $notification->set_sender($sender); $notification->set_reply_to($reply_to); $notification->set_subject($subject); - $notification->set_links(array($link)); - $notification->set_popupdata($link['app']??$this->app, $link, $link['id']??null); + if ($link) + { + $notification->set_links(array($link)); + $notification->set_popupdata($link['app']??$this->app, $link, $link['id']??null); + } if ($attachments && is_array($attachments)) { $notification->set_attachments($attachments);