From 04434f72d4071d54fc8f537dbb281301739da17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 6 Jul 2021 17:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Node.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index b9dfca2a..b611ddc1 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -20,7 +20,6 @@ use JetBrains\PhpStorm\Pure; use Snowflake\Core\Json; use Snowflake\Snowflake; use Throwable; -use function Input; /** * Class Node @@ -448,15 +447,11 @@ class Node extends HttpService if (empty($this->childes)) { return null; } - if (isset($this->childes[$search])) { return $this->childes[$search]; } - - $_searchMatch = '/<(\w+)?:(.+)?>/'; foreach ($this->childes as $key => $val) { - if (preg_match($_searchMatch, (string)$key, $match)) { - Input()->addGetParam($match[1] ?? '--', $search); + if ($search == $key) { return $this->childes[$key]; } }