Skip to content

Commit

Permalink
Merge pull request #31156 from sakiss/null_menu
Browse files Browse the repository at this point in the history
[4.0] Active menu does not exist, fatal error
  • Loading branch information
rdeutz authored Oct 22, 2020
2 parents e9863f3 + d8568dd commit 0e3beac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions templates/cassiopeia/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
$itemid = $app->input->getCmd('Itemid', '');
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
$menu = $app->getMenu()->getActive();
$pageclass = $menu->getParams()->get('pageclass_sfx');

$pageclass = $menu !== null ? $menu->getParams()->get('pageclass_sfx', '') : '';
// Enable assets
$wa->usePreset('template.cassiopeia.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
Expand Down

0 comments on commit 0e3beac

Please sign in to comment.