From ccfbd46bab0acc17dc8d56339c7ebd9e2a57f878 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 25 Mar 2016 12:24:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Route=E7=B1=BB=E4=B8=80?= =?UTF-8?q?=E5=A4=84=E8=AD=A6=E5=91=8A=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index 4e5dc38a..1ed5660f 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -127,7 +127,7 @@ class Route $key = substr($key, 1, -1); $result = ['routes' => $val, 'option' => $option, 'pattern' => $pattern]; } elseif (is_array($val)) { - $result = ['route' => $val[0], 'option' => $val[1], 'pattern' => $val[2]]; + $result = ['route' => $val[0], 'option' => $val[1], 'pattern' => isset($val[2]) ? $val[2] : []]; } else { $result = ['route' => $val, 'option' => $option, 'pattern' => $pattern]; }