Skip to content

Commit

Permalink
Make sure siteaccess exists in request before using it in SetPageLayo…
Browse files Browse the repository at this point in the history
…utListener
  • Loading branch information
emodric committed Nov 9, 2020
1 parent 9b2b444 commit a1c4aa8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ public function onKernelRequest(GetResponseEvent $event)
return;
}

$siteAccess = $event->getRequest()->attributes->get('siteaccess')->name;
$request = $event->getRequest();
if (!$request->attributes->has('siteaccess')) {
return;
}

$siteAccess = $request->attributes->get('siteaccess')->name;
if (!isset($this->groupsBySiteAccess[$siteAccess])) {
return;
}
Expand Down

0 comments on commit a1c4aa8

Please sign in to comment.