瀏覽代碼

Correctif UrlResolver

develop
Guillaume Bourgeois 1 年之前
父節點
當前提交
5376b4be91
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. +4
    -1
      Resolver/UrlResolver.php

+ 4
- 1
Resolver/UrlResolver.php 查看文件

@@ -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…
取消
儲存