From 45ba0feeadeff117e90c065c03488a1e1c27bdf7 Mon Sep 17 00:00:00 2001 From: Herpaderp Aldent Date: Sun, 2 Oct 2022 15:11:50 +0200 Subject: [PATCH] Set empty string as default value (#161) --- src/Storage/LaravelCacheStorage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Storage/LaravelCacheStorage.php b/src/Storage/LaravelCacheStorage.php index 928869a5..3e3416d9 100644 --- a/src/Storage/LaravelCacheStorage.php +++ b/src/Storage/LaravelCacheStorage.php @@ -26,7 +26,7 @@ public function __construct(Cache $cache) public function fetch($key) { try { - $cache = unserialize($this->cache->get($key)); + $cache = unserialize($this->cache->get($key, '')); if ($cache instanceof CacheEntry) { return $cache; } @@ -70,7 +70,7 @@ public function delete($key) { return $this->cache->forget($key); } - + protected function getLifeTime(CacheEntry $data) { $version = app()->version();