Skip to content

Commit

Permalink
fix(InternalNotificationSender) Changed var name to avoid null refere…
Browse files Browse the repository at this point in the history
…nce by re-assigning a variable
  • Loading branch information
nyeholt committed Mar 28, 2021
1 parent 9e9dac5 commit 1c1f4ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/InternalNotificationSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() : ''
Expand All @@ -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();
Expand Down

0 comments on commit 1c1f4ce

Please sign in to comment.