diff --git a/Classes/Controller/LatestController.php b/Classes/Controller/LatestController.php index 393c956362a98045addca3de04b42f4d7db69029..3984a3168043b731e4fd0a90c122271aa864e203 100644 --- a/Classes/Controller/LatestController.php +++ b/Classes/Controller/LatestController.php @@ -63,7 +63,7 @@ class LatestController extends AbstractController { * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException * @throws \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException */ - public function indexAction(array $newsMetaData = [], $offset = 0) { + public function indexAction(array $newsMetaData = [], $offset = 0): ?\Psr\Http\Message\ResponseInterface { $limit = ((int) $this->settings['limit']); $limit = ($limit < 1 ? 1 : $limit); @@ -104,6 +104,12 @@ class LatestController extends AbstractController { } $this->view->assign('newsMetaData', $newsMetaData); + if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11.0.0', '<')) { + return NULL; + } + else { + return $this->htmlResponse(); + } } /** diff --git a/Classes/Controller/ListByCategoryController.php b/Classes/Controller/ListByCategoryController.php index 2f405c986df67aa5f2925f43c1ac84e697c36880..67f54c08708c2dcdd2caaad752a833e2cae73a66 100644 --- a/Classes/Controller/ListByCategoryController.php +++ b/Classes/Controller/ListByCategoryController.php @@ -103,7 +103,7 @@ class ListByCategoryController extends AbstractController { * @throws ImmediateResponseException * @throws \TYPO3\CMS\Core\Error\Http\PageNotFoundException */ - public function indexAction(array $newsMetaData = [], int $currentPageBrowserPage = 0) { + public function indexAction(array $newsMetaData = [], int $currentPageBrowserPage = 0): ?\Psr\Http\Message\ResponseInterface { $filterByCategories = FALSE; $categoryUids = GeneralUtility::intExplode(',', $this->settings['categories']); $tagUids = GeneralUtility::intExplode(',', $this->settings['tags'], TRUE); @@ -183,5 +183,12 @@ class ListByCategoryController extends AbstractController { $this->view->assign('numberOfPages', $numberOfPages); $this->view->assign('newsMetaData', $newsMetaData); $this->view->assign('categories', $categories); + + if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11.0.0', '<')) { + return NULL; + } + else { + return $this->htmlResponse(); + } } }