From 8853b5883894d408d2b909d35370d349168416ba Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 28 Jul 2016 14:48:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRoute=E7=B1=BB=E7=9A=84import?= =?UTF-8?q?=E6=96=B9=E6=B3=95=20=E5=AF=B9=20=E8=B7=AF=E7=94=B1=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E6=A0=87=E8=AF=86=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/think/Route.php b/library/think/Route.php index 09673401..f15ae493 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -175,10 +175,9 @@ class Route if (empty($val)) { continue; } - if (0 === strpos($key, '[')) { + if (is_string($key) && 0 === strpos($key, '[')) { $key = substr($key, 1, -1); self::group($key, $val); - } elseif (is_array($val)) { self::setRule($key, $val[0], $type, $val[1], isset($val[2]) ? $val[2] : []); } else {