Fix warning when deleting discussion forever

Related to flarum/core#842
This commit is contained in:
Toby Zerner 2016-03-03 12:53:31 +10:30
parent 287bdf10dd
commit d5f3987cf7

View File

@ -107,6 +107,10 @@ class UpdateTagMetadata
*/ */
protected function updateTags($discussion, $delta = 0, $tags = null) protected function updateTags($discussion, $delta = 0, $tags = null)
{ {
if (! $discussion) {
return;
}
if (! $tags) { if (! $tags) {
$tags = $discussion->tags; $tags = $discussion->tags;
} }