Browse Source

Correctif UrlResolver

develop
Guillaume Bourgeois 1 year ago
parent
commit
5376b4be91
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      Resolver/UrlResolver.php

+ 4
- 1
Resolver/UrlResolver.php View File



public function getRouteCurrentRequest(): ?string public function getRouteCurrentRequest(): ?string
{ {
if(!$this->requestStack->getCurrentRequest()) {
return null;
}

$requestAttributes = $this->requestStack->getCurrentRequest()->attributes->all(); $requestAttributes = $this->requestStack->getCurrentRequest()->attributes->all();
$route = isset($requestAttributes['_route']) ? $requestAttributes['_route'] : null; $route = isset($requestAttributes['_route']) ? $requestAttributes['_route'] : null;


return $route; return $route;
} }

} }

Loading…
Cancel
Save