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)) {