From 7939aa54317b6224324cd0e4d3f383293aa71ccf Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 18 Oct 2014 14:25:18 +0200 Subject: [PATCH] Fixed tags being able to relate to themselves --- src/Services/TagService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Services/TagService.php b/src/Services/TagService.php index c7967878..a07f63d3 100644 --- a/src/Services/TagService.php +++ b/src/Services/TagService.php @@ -178,11 +178,13 @@ class TagService private function updateImplications(Tag $tag, array $relatedNames) { + $relatedNames = array_udiff($relatedNames, [$tag->getName()], 'strnatcasecmp'); $tag->setImpliedTags($this->createTags($relatedNames)); } private function updateSuggestions(Tag $tag, array $relatedNames) { + $relatedNames = array_udiff($relatedNames, [$tag->getName()], 'strnatcasecmp'); $tag->setSuggestedTags($this->createTags($relatedNames)); } }