summaryrefslogtreecommitdiff
path: root/vendor/illuminate/cache/FileStore.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/illuminate/cache/FileStore.php')
-rwxr-xr-xvendor/illuminate/cache/FileStore.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/illuminate/cache/FileStore.php b/vendor/illuminate/cache/FileStore.php
index f48ebc2b19..228d69976e 100755
--- a/vendor/illuminate/cache/FileStore.php
+++ b/vendor/illuminate/cache/FileStore.php
@@ -186,7 +186,13 @@ class FileStore implements Store
return $this->emptyPayload();
}
- $data = unserialize(substr($contents, 10));
+ try {
+ $data = unserialize(substr($contents, 10));
+ } catch (Exception $e) {
+ $this->forget($key);
+
+ return $this->emptyPayload();
+ }
// Next, we'll extract the number of seconds that are remaining for a cache
// so that we can properly retain the time for things like the increment