From 54f11e8b25115a5f1ea4cf997de23de05d675bf5 Mon Sep 17 00:00:00 2001 From: F4nniu Date: Tue, 29 Nov 2022 17:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=20php8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index f572b907..a1b1f287 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -400,10 +400,10 @@ class App private static function getParamValue($param, &$vars, $type) { $name = $param->getName(); - $class = $param->getClass(); + $reflectionType = $param->getType(); - if ($class) { - $className = $class->getName(); + if ($reflectionType && $reflectionType->isBuiltin() === false) { + $className = $reflectionType->getName(); $bind = Request::instance()->$name; if ($bind instanceof $className) {