From 3b3012495187a4be9804dfc4fe92d0d1a545afa8 Mon Sep 17 00:00:00 2001 From: JiaJia Ji Date: Fri, 7 Apr 2023 09:38:17 +0200 Subject: [PATCH] Update NewsController.php --- src/Controller/NewsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/NewsController.php b/src/Controller/NewsController.php index 1a461aa4..6a86e1c6 100644 --- a/src/Controller/NewsController.php +++ b/src/Controller/NewsController.php @@ -89,8 +89,8 @@ public function newsTeaserAction(Request $request): Response public function emailNewsTeaserAction(Request $request, NewsLinkGenerator $newsLinkGenerator): Response { $paramsBag = []; - if ($request->query->get('type') === 'object') { - $news = News::getById($request->query->getInt('id')); + if ($request->get('type') === 'object') { + $news = News::getById($request->get('id')); $paramsBag['news'] = $news; $paramsBag['detailLink'] = $newsLinkGenerator->generate($news, ['document' => $this->document->getProperty('news_default_document')]);