Small bugfix.
All checks were successful
continuous-integration/drone/push Build is passing

- Added a small fix that suppresses warnings when no cache data exists.
This commit is contained in:
Abel Hoogeveen 2021-11-24 12:37:51 +01:00
parent d834f77b7e
commit 0b5a867bc7
Signed by: abelhooge
GPG Key ID: C540221690CBFFBA

View File

@ -49,7 +49,7 @@ class ObjectStorageCache implements CacheInterface
private function testTTL(string $key)
{
$meta = $this->provider->getItemMeta('fwcache_' . $key);
if ($meta['ttl'] > 0 && time() > $meta['time'] + $meta['ttl'])
if (!is_null($meta) && $meta['ttl'] > 0 && time() > $meta['time'] + $meta['ttl'])
$this->provider->deleteItem('fwcache_' . $key);
}