diff --git a/phpmyfaq/search.php b/phpmyfaq/search.php index c78a761784..decf187eb8 100755 --- a/phpmyfaq/search.php +++ b/phpmyfaq/search.php @@ -100,6 +100,7 @@ $tagSearch = true; $tags = []; $tagIds = explode(',', (string) $inputTag); + $relTags = ''; $tagHelper->setTaggingIds($tagIds); @@ -138,7 +139,6 @@ uasort($relatedTags, static fn($a, $b) => $b - $a); $numTags = 0; - $relTags = ''; foreach ($relatedTags as $tagId => $relevance) { $relTags .= $tagHelper->renderRelatedTag($tagId, $tagging->getTagNameById($tagId), $relevance); @@ -151,6 +151,7 @@ } } else { $searchResult = ''; + $relTags = ''; } //