From d1925efb2207ac4be3ad0c40b8277175f99ffaff Mon Sep 17 00:00:00 2001 From: hcomnetworkers Date: Sat, 25 Jul 2020 17:56:04 +0200 Subject: [PATCH] Added missing array check to adapter class #39 (#40) --- src/Storage/Adapter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Storage/Adapter.php b/src/Storage/Adapter.php index 3aa8b1a..649a60e 100644 --- a/src/Storage/Adapter.php +++ b/src/Storage/Adapter.php @@ -68,8 +68,8 @@ public function setFromStorage($json) list($cache, $complete, $expire) = json_decode($json, true); if (! $expire || $expire > $this->getTime()) { - $this->cache = $cache; - $this->complete = $complete; + $this->cache = is_array($cache) ? $cache : []; + $this->complete = is_array($complete) ? $complete : []; } else { $this->adapter->delete($this->file); }