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;