From 35d651438147ce0a9b04a00c911e6e2eb0661ec5 Mon Sep 17 00:00:00 2001 From: F4nniu Date: Sun, 16 Jul 2023 15:27:20 +0800 Subject: [PATCH] =?UTF-8?q?api=20=E7=94=9F=E6=88=90=E5=85=BC=E5=AE=B9=20ph?= =?UTF-8?q?p8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/command/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/admin/command/Api.php b/application/admin/command/Api.php index d9d79c4e..d8098414 100644 --- a/application/admin/command/Api.php +++ b/application/admin/command/Api.php @@ -163,7 +163,7 @@ class Api extends Command if ($getting_namespace === true) { //If the token is a string or the namespace separator... - if (is_array($token) && in_array($token[0], [T_STRING, T_NS_SEPARATOR])) { + if (is_array($token) && in_array($token[0], version_compare(PHP_VERSION, '8.0.0', '<') ? [T_STRING, T_NS_SEPARATOR] : [T_NAME_QUALIFIED])) { //Append the token's value to the name of the namespace $namespace .= $token[1];