diff --git a/src/Illuminate/Cache/FileStore.php b/src/Illuminate/Cache/FileStore.php index b18e568f6407..9d5e2e95c872 100755 --- a/src/Illuminate/Cache/FileStore.php +++ b/src/Illuminate/Cache/FileStore.php @@ -290,9 +290,11 @@ protected function getPayload($key) // just return null. Otherwise, we'll get the contents of the file and get // the expiration UNIX timestamps from the start of the file's contents. try { - $expire = substr( - $contents = $this->files->get($path, true), 0, 10 - ); + if (is_null($contents = $this->files->get($path, true))) { + return $this->emptyPayload(); + } + + $expire = substr($contents, 0, 10); } catch (Exception) { return $this->emptyPayload(); }