diff --git a/library/think/Route.php b/library/think/Route.php index 506d74ba..0fa95d97 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -1057,7 +1057,7 @@ class Route if (!empty($array[1])) { self::parseUrlParams($array[1]); } - return ['type' => 'method', 'method' => [$class, $action]]; + return ['type' => 'method', 'method' => [$class, $action], 'var' => []]; } /** @@ -1077,7 +1077,7 @@ class Route if (!empty($array[2])) { self::parseUrlParams($array[2]); } - return ['type' => 'method', 'method' => [$namespace . '\\' . Loader::parseName($class, 1), $method]]; + return ['type' => 'method', 'method' => [$namespace . '\\' . Loader::parseName($class, 1), $method], 'var' => []]; } /** @@ -1096,7 +1096,7 @@ class Route if (!empty($array[1])) { self::parseUrlParams($array[1]); } - return ['type' => 'controller', 'controller' => $controller . '/' . $action]; + return ['type' => 'controller', 'controller' => $controller . '/' . $action, 'var' => []]; } /**