From 87817d186cf44a903dfd6e9f3cc3135279c7aa8a Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 4 Jan 2022 10:52:29 +0800 Subject: [PATCH] * Fix router error of api. --- framework/api/router.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/api/router.class.php b/framework/api/router.class.php index e23ae61c1b..8cee8c4a5d 100644 --- a/framework/api/router.class.php +++ b/framework/api/router.class.php @@ -92,6 +92,7 @@ class api extends router */ $this->path = trim(substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], 'api.php') + 7), '/'); + if(strpos($this->path, '?') > 0) $this->path = strstr($this->path, '?', true); $subPos = $this->path ? strpos($this->path, '/') : false; $this->version = $subPos !== false ? substr($this->path, 0, $subPos) : '';