diff --git a/Classes/Controller/SearchController.php b/Classes/Controller/SearchController.php index 5d547f3986..0f7921e5de 100644 --- a/Classes/Controller/SearchController.php +++ b/Classes/Controller/SearchController.php @@ -114,7 +114,7 @@ public function resultsAction(): ResponseInterface $this->controllerContext->setSearchResultSet($searchResultSet); $currentPage = $this->request->hasArgument('page') ? (int)$this->request->getArgument('page') : 1; - $itemsPerPage = $searchResultSet->getUsedResultsPerPage(); + $itemsPerPage = ($searchResultSet->getUsedResultsPerPage() ?: $this->typoScriptConfiguration->getSearchResultsPerPage(10)); $paginator = GeneralUtility::makeInstance(ResultsPaginator::class, $searchResultSet, $currentPage, $itemsPerPage); $pagination = GeneralUtility::makeInstance(ResultsPagination::class, $paginator); $pagination->setMaxPageNumbers((int)$this->typoScriptConfiguration->getMaxPaginatorLinks(0));