Explorar el Código

Merge branch 'develop'

master
Fabien Normand hace 3 días
padre
commit
9c469074da
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. +7
    -2
      Resolver/SectionResolver.php

+ 7
- 2
Resolver/SectionResolver.php Ver fichero

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


}
}

Cargando…
Cancelar
Guardar