core/modules/forum/src/Controller/ForumController.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/modules/forum/src/Controller/ForumController.php b/core/modules/forum/src/Controller/ForumController.php index aeb172c..f0ea9b3 100644 --- a/core/modules/forum/src/Controller/ForumController.php +++ b/core/modules/forum/src/Controller/ForumController.php @@ -167,8 +167,8 @@ public function forumPage(TermInterface $taxonomy_term) { $header = $build['header']; } else { - $topics = ''; - $header = array(); + $topics = []; + $header = []; } return $this->build($taxonomy_term->forums, $taxonomy_term, $topics, $taxonomy_term->parents, $header); } @@ -232,10 +232,8 @@ protected function build($forums, TermInterface $term, $topics = array(), $paren foreach ($forums as $forum) { $this->renderer->addCacheableDependency($build, $forum); } - if (!empty($topics)) { - foreach ($topics as $topic) { - $this->renderer->addCacheableDependency($build, $topic); - } + foreach ($topics as $topic) { + $this->renderer->addCacheableDependency($build, $topic); } foreach ($parents as $parent) { $this->renderer->addCacheableDependency($build, $parent);