From 1c1f4ce12ec48cbe6d6cbc3d04724b7679a514a0 Mon Sep 17 00:00:00 2001 From: Marcus Nyeholt Date: Sun, 28 Mar 2021 17:34:49 +1100 Subject: [PATCH] fix(InternalNotificationSender) Changed var name to avoid null reference by re-assigning a variable --- src/Service/InternalNotificationSender.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Service/InternalNotificationSender.php b/src/Service/InternalNotificationSender.php index 9ea4ac6..a838f79 100644 --- a/src/Service/InternalNotificationSender.php +++ b/src/Service/InternalNotificationSender.php @@ -73,7 +73,7 @@ public function sendToUser($notification, $context, $user, $data) $body = $message; } - $context = array_merge([ + $contextData = array_merge([ 'ClassName' => get_class($context), 'ID' => $context->ID, 'Link' => $context->hasMethod('Link') ? $context->Link() : '' @@ -87,7 +87,7 @@ public function sendToUser($notification, $context, $user, $data) 'SentOn' => date('Y-m-d H:i:s'), 'SourceObjectID' => $context->ID, 'SourceNotificationID' => $notification->ID, - 'Context' => $context + 'Context' => $contextData ]); $notice->write();