Skip to content
Snippets Groups Projects
Commit 27b172ef authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Fix another exception with empty news

parent d415d09a
No related branches found
Tags 3.2.4
No related merge requests found
......@@ -66,7 +66,7 @@ class OverviewController extends AbstractController {
*
* @param array $categoryIds
*/
protected function highlightBestFitNews(array $categoryIds) {
protected function highlightBestFitNews(array $categoryIds = NULL) {
/** @var News $highlightedNews */
$highlightedNews = $this->newsRepository
->findLastUpdatedOrHighlightedNewsByCategories(1, FALSE, $categoryIds)->getFirst();
......
......@@ -100,7 +100,7 @@ class NewsRepository extends AbstractRepository {
* @return QueryResult
*/
public function findLastUpdatedOrHighlightedNewsByCategories(
$limit = 1, $onlyHighlighted = FALSE, $categoryIds = NULL, $offset = 0, $hideNeverHighlightedNews = FALSE
$limit = 1, $onlyHighlighted = FALSE, array $categoryIds = NULL, $offset = 0, $hideNeverHighlightedNews = FALSE
) {
$query = $this->createQuery();
$constraints = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment