From ca66cb766d277f5505f014cca2937b07aad666fe Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 10 Apr 2024 10:11:40 +0900 Subject: [PATCH] fix: Factories::get() cannot get defined classes --- system/Config/Factories.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/Config/Factories.php b/system/Config/Factories.php index f8102118bc1d..d98664a24a7b 100644 --- a/system/Config/Factories.php +++ b/system/Config/Factories.php @@ -180,7 +180,9 @@ public static function get(string $component, string $alias): ?object if (isset(self::$aliases[$component][$alias])) { $class = self::$aliases[$component][$alias]; - return self::$instances[$component][$class]; + if (isset(self::$instances[$component][$class])) { + return self::$instances[$component][$class]; + } } return self::__callStatic($component, [$alias]);