From 23696a8a4c3ebe2ab3d68a35b2698fa103f69334 Mon Sep 17 00:00:00 2001 From: Jordan Hall Date: Mon, 31 Dec 2018 09:36:51 +0000 Subject: [PATCH] Bail out earlier if we could not read the file content of its data could not be uncompressed --- src/DOFileCache.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/DOFileCache.php b/src/DOFileCache.php index abab70d..77d0914 100644 --- a/src/DOFileCache.php +++ b/src/DOFileCache.php @@ -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