diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index f153179..0ffb472 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -1007,6 +1007,9 @@ function template_preprocess_forums(&$variables) { '#tid' => $variables['tid'], ); } + else { + $variables['forums'] = array(); + } if ($variables['tid'] && array_search($variables['tid'], config('forum.settings')->get('containers')) === FALSE) { $variables['topics'] = array( @@ -1017,6 +1020,9 @@ function template_preprocess_forums(&$variables) { '#forum_per_page' => $variables['forum_per_page'], ); } + else { + $variables['topics'] = array(); + } // Provide separate template suggestions based on what's being output. Topic id is also accounted for. // Check both variables to be safe then the inverse. Forums with topic ID's take precedence. @@ -1033,6 +1039,11 @@ function template_preprocess_forums(&$variables) { else { $variables['theme_hook_suggestions'][] = 'forums__' . $variables['tid']; } + + } + else { + $variables['forums'] = array(); + $variables['topics'] = array(); } }