From 9417a3011f33f87da1aff5005dc057d14a264b14 Mon Sep 17 00:00:00 2001 From: Najdanovic Ivan Date: Thu, 7 Mar 2024 11:05:00 +0100 Subject: [PATCH] fix: BaseService getSharedInstance should properly cache null --- system/Config/BaseService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Config/BaseService.php b/system/Config/BaseService.php index 835145eee460..68f8c526fb41 100644 --- a/system/Config/BaseService.php +++ b/system/Config/BaseService.php @@ -192,7 +192,7 @@ protected static function getSharedInstance(string $key, ...$params) return static::$mocks[$key]; } - if (! isset(static::$instances[$key])) { + if (! array_key_exists($key, static::$instances)) { // Make sure $getShared is false $params[] = false;