From a0eb07e370b27682b45bf9bfce95864dc883f91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jer=C3=B4me=20Bakker?= Date: Wed, 14 Aug 2024 14:57:20 +0200 Subject: [PATCH] fixed: notification should check for entity --- .../CreateNotificationRelationshipEventHandler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/ColdTrick/TagTools/Notifications/CreateNotificationRelationshipEventHandler.php b/classes/ColdTrick/TagTools/Notifications/CreateNotificationRelationshipEventHandler.php index f9d67d2..70e9020 100644 --- a/classes/ColdTrick/TagTools/Notifications/CreateNotificationRelationshipEventHandler.php +++ b/classes/ColdTrick/TagTools/Notifications/CreateNotificationRelationshipEventHandler.php @@ -147,9 +147,13 @@ public function getUnsentTagsForEntity(): array { return $this->unsent_tags; } + $this->unsent_tags = []; + $entity = $this->getNotificationEntity(); + if ($entity instanceof \ElggEntity) { + $this->unsent_tags = tag_tools_get_unsent_notification_tags($entity); + } - $this->unsent_tags = tag_tools_get_unsent_notification_tags($entity); return $this->unsent_tags; }