|
|
@@ -49,7 +49,12 @@ class SectionResolver |
|
|
|
|
|
|
|
public function getCurrent($returnDefaultIfOutOfSections = false, $returnVisitedIfOutOfSection = false, $throwExceptionIfSectionNotFound = true) |
|
|
|
{ |
|
|
|
$requestAttributesArray = $this->requestStack->getMainRequest()->attributes->all(); |
|
|
|
$requestAttributesArray = []; |
|
|
|
|
|
|
|
$request = $this->requestStack->getMainRequest(); |
|
|
|
if($request) { |
|
|
|
$requestAttributesArray = $request->attributes->all(); |
|
|
|
} |
|
|
|
|
|
|
|
// admin |
|
|
|
if (isset($requestAttributesArray['_firewall_context']) && $requestAttributesArray['_firewall_context'] == 'security.firewall.map.context.admin') { |
|
|
@@ -143,4 +148,4 @@ class SectionResolver |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |