Skip to content

Commit c73d1dd

Browse files
committed
fix: corrected undefined variable $searchResults in tag search pagination
1 parent ac1a90e commit c73d1dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

phpmyfaq/search.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
$tagHelper = new TagsHelper();
9393
$tagSearch = false;
9494
$numOfResults = 0;
95+
$searchResults = [];
9596

9697
//
9798
// Handle the Tagging ID
@@ -253,7 +254,7 @@
253254
$searchHelper->setPlurals(new Plurals());
254255
$searchHelper->setSessionId($sids);
255256

256-
if ($numOfResults > 0 && $inputSearchTerm !== '') {
257+
if ($numOfResults > 0 && ($inputSearchTerm !== '' || $tagSearch)) {
257258
try {
258259
$searchResults = $searchHelper->getSearchResult($faqSearchResult, $page);
259260
} catch (Exception | CommonMarkException) {

0 commit comments

Comments
 (0)