Przeglądaj źródła

Merge branch 'develop'

master
Fabien Normand 3 dni temu
rodzic
commit
9c469074da
1 zmienionych plików z 7 dodań i 2 usunięć
  1. +7
    -2
      Resolver/SectionResolver.php

+ 7
- 2
Resolver/SectionResolver.php Wyświetl plik

@@ -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
}


}
}

Ładowanie…
Anuluj
Zapisz