From 38246438ff001c8505fe6d7cd52010f888f32c1a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 31 Jul 2016 18:49:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRoute=E7=B1=BB=E7=9A=84setRul?= =?UTF-8?q?e=E6=96=B9=E6=B3=95=20=E5=85=BC=E5=AE=B9PHP7=E4=BB=A5=E4=B8=8B?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= 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 2927e199..57e2c4d0 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -257,7 +257,8 @@ class Route protected static function setRule($rule, $route, $type = '*', $option = [], $pattern = [], $group = '') { if (is_array($rule)) { - list($name, $rule) = $rule; + $name = $rule[0]; + $rule = $rule[1]; } if ('$' == substr($rule, -1, 1)) { // 是否完整匹配