diff --git a/src/Repository/PostRepository.php b/src/Repository/PostRepository.php index a540aaf37..0d7c26d30 100644 --- a/src/Repository/PostRepository.php +++ b/src/Repository/PostRepository.php @@ -87,11 +87,11 @@ public function findBySearchQuery(string $query, int $limit = Post::NUM_ITEMS): private function extractSearchTerms(string $searchQuery): array { $searchQuery = u($searchQuery)->replaceMatches('/[[:space:]]+/', ' ')->trim(); - $terms = array_unique(u($searchQuery)->split(' ')); + $terms = array_unique($searchQuery->split(' ')); // ignore the search terms that are too short return array_filter($terms, function ($term) { - return 2 <= u($term)->length(); + return 2 <= $term->length(); }); } }