Skip to content

Commit

Permalink
Bail out earlier if we could not read the file content of its data co…
Browse files Browse the repository at this point in the history
…uld not be uncompressed
  • Loading branch information
DivineOmega committed Dec 31, 2018
1 parent 6f75be7 commit 23696a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/DOFileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public function get($key)
}
}

// Bail immediately if the file could not be read, or its data could not be uncompressed
if (!$cacheFileData) {
return false;
}

$cacheObj = json_decode($cacheFileData);

// Unable to decode JSON
Expand Down

0 comments on commit 23696a8

Please sign in to comment.