]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/PageRepo.php
Found the source of the issue, not sure how to fix
[bookstack] / app / Repos / PageRepo.php
index fa5f7dd01f50579cfcc1ecd4a567b36385287d0b..bfaff79ae3ce22fec0bd00f9f63a6e1b2e9b6df6 100644 (file)
@@ -208,7 +208,9 @@ class PageRepo
         } else {
             $terms = [];
         }
-        $terms = array_merge($terms, explode(' ', $term));
+        if (!empty($term)) {
+            $terms = array_merge($terms, explode(' ', $term));
+        }
         $pages = $this->page->fullTextSearchQuery(['name', 'text'], $terms, $whereTerms)
             ->paginate($count)->appends($paginationAppends);