From 643726df43abc8201db78da5175d18e45eb69e77 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 19 May 2015 11:23:35 +0930 Subject: [PATCH] Fix undefined variables --- .../mentions/src/Handlers/PostMentionsMetadataUpdater.php | 4 +++- .../mentions/src/Handlers/UserMentionsMetadataUpdater.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/mentions/src/Handlers/PostMentionsMetadataUpdater.php b/extensions/mentions/src/Handlers/PostMentionsMetadataUpdater.php index a5f738234..5f36506c6 100755 --- a/extensions/mentions/src/Handlers/PostMentionsMetadataUpdater.php +++ b/extensions/mentions/src/Handlers/PostMentionsMetadataUpdater.php @@ -30,7 +30,9 @@ class PostMentionsMetadataUpdater public function whenPostWasPosted(PostWasPosted $event) { - $mentioned = $this->syncMentions($event->post); + $reply = $event->post; + + $mentioned = $this->syncMentions($reply); // @todo convert this into a new event (PostWasMentioned) and send // notification as a handler? diff --git a/extensions/mentions/src/Handlers/UserMentionsMetadataUpdater.php b/extensions/mentions/src/Handlers/UserMentionsMetadataUpdater.php index c137ef959..f28f21615 100755 --- a/extensions/mentions/src/Handlers/UserMentionsMetadataUpdater.php +++ b/extensions/mentions/src/Handlers/UserMentionsMetadataUpdater.php @@ -31,7 +31,9 @@ class UserMentionsMetadataUpdater public function whenPostWasPosted(PostWasPosted $event) { - $mentioned = $this->syncMentions($event->post); + $post = $event->post; + + $mentioned = $this->syncMentions($post); // @todo convert this into a new event (UserWasMentioned) and send // notification as a handler?