1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 21:54:03 +00:00

Fix data_cache test

This commit is contained in:
Samuel Štancl 2019-09-21 19:58:29 +02:00
parent a2c6963e85
commit 4bd2d43e9b

View file

@ -186,7 +186,12 @@ class RedisStorageDriver implements StorageDriver
{ {
$tenant = $tenant ?? $this->tenant(); $tenant = $tenant ?? $this->tenant();
return json_decode($this->redis->hget("tenants:{$tenant->id}", $key), true); $json_data = $this->redis->hget("tenants:{$tenant->id}", $key);
if ($json_data === false) {
return null;
}
return json_decode($json_data, true);
} }
public function getMany(array $keys, Tenant $tenant = null): array public function getMany(array $keys, Tenant $tenant = null): array