From e718d39ef00382fecb59ed8971adb536c8c75d5a Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 26 Dec 2022 12:14:45 +0000 Subject: [PATCH] Fixes "E_WARNING: Undefined variable $subject" --- src/Navigation/Notifications/Repository/Notify.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Navigation/Notifications/Repository/Notify.php b/src/Navigation/Notifications/Repository/Notify.php index 278451936..60e801d03 100644 --- a/src/Navigation/Notifications/Repository/Notify.php +++ b/src/Navigation/Notifications/Repository/Notify.php @@ -783,6 +783,8 @@ class Notify extends BaseRepository $subject = $l10n->t('%s %s shared a new post', $subjectPrefix, $contact['name']); } else { $params['type'] = Model\Notification\Type::COMMENT; + $subject = $l10n->t('%1$s Comment to conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']); + if ($params['verb'] = Activity::LIKE) { switch ($Notification->type) { case Model\Post\UserNotification::TYPE_DIRECT_COMMENT: @@ -792,8 +794,6 @@ class Notify extends BaseRepository $subject = $l10n->t('%1$s %2$s liked your comment on #%3$d', $subjectPrefix, $contact['name'], $item['parent']); break; } - } else { - $subject = $l10n->t('%1$s Comment to conversation #%2$d by %3$s', $subjectPrefix, $item['parent'], $contact['name']); } }