1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:44:04 +00:00

CachedTenantResolver missing cache case crash fix. (#1005)

* CachedTenantResolver missing cache case crash fix.

* Check if cached tenant is truthy

Co-authored-by: rty <rty@interlogic.com.ua>
Co-authored-by: lukinovec <lukinovec@gmail.com>
This commit is contained in:
Roman 2023-01-18 19:46:47 +02:00 committed by GitHub
parent 21d55ef472
commit 3e13e62806
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,9 +27,7 @@ abstract class CachedTenantResolver implements TenantResolver
$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;