From 9c57100d676e4617a160a38d599646e0f8d0874a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 22 Oct 2016 19:42:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=A0=87=E8=AF=86=E4=B8=8D?= =?UTF-8?q?=E5=8C=BA=E5=88=86=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/Route.php b/library/think/Route.php index 315d6667..5553a0fb 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -306,7 +306,7 @@ class Route $vars = self::parseVar($rule); if (isset($name)) { $key = $group ? $group . '/' . $rule : $rule; - self::name($name, [$key, $vars, self::$domain]); + self::name(strtolower($name), [$key, $vars, self::$domain]); } if ($group) { if ('*' != $type) { @@ -1202,7 +1202,7 @@ class Route self::parseUrlParams(empty($path) ? '' : implode('|', $path)); // 封装路由 $route = [$module, $controller, $action]; - if (isset(self::$rules['name'][implode($depr, $route)])) { + if (isset(self::$rules['name'][strtolower(implode($depr, $route))])) { throw new HttpException(404, 'invalid request:' . str_replace('|', $depr, $url)); } }