From 994622b0073bf64309a3383a2bf3dcfbf9172f03 Mon Sep 17 00:00:00 2001
From: Matthias Adrowski <matthias.adrowski@sgalinski.de>
Date: Mon, 10 Jan 2022 15:48:39 +0100
Subject: [PATCH] [TASK] NewsFeedController

---
 Classes/Controller/NewsFeedController.php | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Classes/Controller/NewsFeedController.php b/Classes/Controller/NewsFeedController.php
index c734588..dc8395e 100644
--- a/Classes/Controller/NewsFeedController.php
+++ b/Classes/Controller/NewsFeedController.php
@@ -46,7 +46,7 @@ class NewsFeedController extends AbstractController {
 	 * @return void
 	 * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException
 	 */
-	public function indexAction() {
+	public function indexAction(): ?\Psr\Http\Message\ResponseInterface {
 		$categories = GeneralUtility::intExplode(',', $this->settings['showCategories'], TRUE);
 		$tags = GeneralUtility::intExplode(',', $this->settings['showTags'], TRUE);
 		$startTime = (int) $this->settings['starttime'];
@@ -74,6 +74,13 @@ class NewsFeedController extends AbstractController {
 
 		$this->view->assign('news', $news);
 		$this->view->assign('newsCategories', $newsCategories);
+
+		if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '11.0.0', '<')) {
+			return NULL;
+		}
+		else {
+			return $this->htmlResponse();
+		}
 	}
 
 	/**
-- 
GitLab