Skip to content

Commit

Permalink
Update NewsController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored Apr 7, 2023
1 parent d390905 commit 3b30124
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Controller/NewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')]);

Expand Down

0 comments on commit 3b30124

Please sign in to comment.