From 25a010660396a54cb54e2f43103124d61ce43e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 24 Apr 2023 21:42:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ControllerInterpreter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ControllerInterpreter.php b/src/ControllerInterpreter.php index a4115ea..230652c 100644 --- a/src/ControllerInterpreter.php +++ b/src/ControllerInterpreter.php @@ -74,6 +74,9 @@ class ControllerInterpreter */ public function resolveMethod(object $class, string|\ReflectionMethod $reflectionMethod, ReflectionClass $reflectionClass): Handler { + if (empty($reflectionMethod)) { + return new Handler([$class, $reflectionMethod], []); + } if (is_string($reflectionMethod)) { $reflectionMethod = $reflectionClass->getMethod($reflectionMethod); }