Skip to content

Commit

Permalink
Added missing array check to adapter class #39 (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
hcomnetworkers committed Jul 25, 2020
1 parent 07590ef commit d1925ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Storage/Adapter.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit d1925ef

Please sign in to comment.