From ccf4c2fdd669adee35fda197c93af8af214be7c0 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 26 May 2016 11:18:09 +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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/Route.php b/library/think/Route.php index 372e9582..0a8d4a13 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -162,10 +162,10 @@ class Route if (is_numeric($key)) { $key = array_shift($val); } + if (empty($val)) { + continue; + } if (0 === strpos($key, '[')) { - if (empty($val)) { - continue; - } $key = substr($key, 1, -1); $result = ['routes' => $val, 'option' => [], 'pattern' => []]; } elseif (is_array($val)) {