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; }