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
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ class OverviewController extends AbstractController { ...@@ -66,7 +66,7 @@ class OverviewController extends AbstractController {
* *
* @param array $categoryIds * @param array $categoryIds
*/ */
protected function highlightBestFitNews(array $categoryIds) { protected function highlightBestFitNews(array $categoryIds = NULL) {
/** @var News $highlightedNews */ /** @var News $highlightedNews */
$highlightedNews = $this->newsRepository $highlightedNews = $this->newsRepository
->findLastUpdatedOrHighlightedNewsByCategories(1, FALSE, $categoryIds)->getFirst(); ->findLastUpdatedOrHighlightedNewsByCategories(1, FALSE, $categoryIds)->getFirst();
......
...@@ -100,7 +100,7 @@ class NewsRepository extends AbstractRepository { ...@@ -100,7 +100,7 @@ class NewsRepository extends AbstractRepository {
* @return QueryResult * @return QueryResult
*/ */
public function findLastUpdatedOrHighlightedNewsByCategories( 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(); $query = $this->createQuery();
$constraints = NULL; $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