Skip to content

Commit

Permalink
Fix undefined array key warning when using an article list (see #4673)
Browse files Browse the repository at this point in the history
Description
-----------

-

Commits
-------

4cbb127 Fix undefined array key warning
1d46c5e Fix the check

Co-authored-by: Leo Feyer <github@contao.org>
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
  • Loading branch information
3 people committed May 17, 2022
1 parent d5e16db commit 7b99005
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -102,7 +102,7 @@ protected function compile()
(
'link' => $objArticles->title,
'title' => StringUtil::specialchars($objArticles->title),
'id' => $cssID[0] ?: 'article-' . $objArticles->id,
'id' => ($cssID[0] ?? null) ?: 'article-' . $objArticles->id,
'articleId' => $objArticles->id,
'href' => $objHelper->getFrontendUrl('/articles/' . ($objArticles->alias ?: $objArticles->id))
);
Expand Down

0 comments on commit 7b99005

Please sign in to comment.