From d5f3987cf7e04c05d3c46eee21a68c8a5831991c Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 3 Mar 2016 12:53:31 +1030 Subject: [PATCH] Fix warning when deleting discussion forever Related to flarum/core#842 --- extensions/tags/src/Listener/UpdateTagMetadata.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/tags/src/Listener/UpdateTagMetadata.php b/extensions/tags/src/Listener/UpdateTagMetadata.php index e0a37590a..6a6dea51c 100755 --- a/extensions/tags/src/Listener/UpdateTagMetadata.php +++ b/extensions/tags/src/Listener/UpdateTagMetadata.php @@ -107,6 +107,10 @@ class UpdateTagMetadata */ protected function updateTags($discussion, $delta = 0, $tags = null) { + if (! $discussion) { + return; + } + if (! $tags) { $tags = $discussion->tags; }