From 59dee0bdcc726821ed5d21ca3ba0050ba03dd649 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 8 Jul 2016 20:21:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=BD=93=E5=89=8D=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=8C=B9=E9=85=8D=E5=90=8E=E7=9A=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index 1991c2e2..59cc72ee 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -748,7 +748,6 @@ class Route } $result = self::checkRule($rule, $route, $url, $pattern, $option); if (false !== $result) { - $request->routeInfo(['rule' => $rule, 'route' => $route, 'pattern' => $pattern, 'option' => $option, 'var' => $request->route()]); return $result; } } @@ -1192,6 +1191,8 @@ class Route } // 解析额外参数 self::parseUrlParams(empty($paths) ? '' : implode('/', $paths), $matches); + // 记录匹配的路由信息 + Request::instance()->routeInfo(['rule' => $rule, 'route' => $route, 'option' => $option]); return $result; }