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

@@ -73,10 +73,13 @@ class UrlResolver

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

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

return $route;
}

}

Loading…
Cancel
Save