From 891c1f99f29743064e9a73820076b153395c1933 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 16 May 2016 10:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRoute=E7=9A=84=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=B1=BB=E5=9E=8B=E5=8F=82=E6=95=B0=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=8F=E5=86=99=E4=BC=A0=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index b1e99c5d..b2481ff1 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -120,7 +120,7 @@ class Route self::resource($rule['__rest__']); unset($rule['__rest__']); } - + $type = strtoupper($type); foreach ($rule as $key => $val) { if (is_numeric($key)) { $key = array_shift($val); @@ -146,6 +146,7 @@ class Route $group = $group ?: self::$group; $option = $option ?: self::$option; + $type = strtoupper($type); if (strpos($type, '|')) { foreach (explode('|', $type) as $val) { self::rule($rule, $route, $val, $option, $pattern, $group); @@ -197,6 +198,7 @@ class Route $option = $name; $name = isset($option['name']) ? $option['name'] : ''; } + $type = strtoupper($type); if (!empty($name)) { if ($routes instanceof \Closure) { self::setGroup($name);