From a1bb3974cb60c91caaa14c0ffe0421982fdfe1db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sun, 25 Apr 2021 12:00:14 +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 --- System/Di/Container.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/Di/Container.php b/System/Di/Container.php index da647e25..b6534c13 100644 --- a/System/Di/Container.php +++ b/System/Di/Container.php @@ -216,7 +216,7 @@ class Container extends BaseObject private function resolveDependencies($class): ?array { if (isset($this->_reflection[$class])) { - return [$this->_reflection[$class], $this->_constructs[$class]]; + return [$this->_reflection[$class], $this->_constructs[$class] ?? []]; } $reflection = new ReflectionClass($class);