From 26b856976132ecbeff8b2d84c90f8acba7a874c0 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 27 Jan 2023 08:17:14 +0100 Subject: [PATCH] Cache crash fix (#1048) --- src/Resolvers/Contracts/CachedTenantResolver.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Resolvers/Contracts/CachedTenantResolver.php b/src/Resolvers/Contracts/CachedTenantResolver.php index 968ac7942..feb9609c8 100644 --- a/src/Resolvers/Contracts/CachedTenantResolver.php +++ b/src/Resolvers/Contracts/CachedTenantResolver.php @@ -36,9 +36,7 @@ public function resolve(...$args): Tenant $key = $this->getCacheKey(...$args); - if ($this->cache->has($key)) { - $tenant = $this->cache->get($key); - + if ($tenant = $this->cache->get($key)) { $this->resolved($tenant, ...$args); return $tenant;