From 8132b4b27216f7ac57d450fb96900b56be62ff89 Mon Sep 17 00:00:00 2001 From: Louis Charette Date: Tue, 18 Oct 2016 22:32:46 -0400 Subject: [PATCH] Fix empty session Fix session being empty when the file is being read and/or written by multiple instance of apache simultaneously. This append to me when assets (javascript / css) are being loaded dynamically using php. Multiples assets in the same request cause the sessions to be corrupted. --- src/Illuminate/Session/FileSessionHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Session/FileSessionHandler.php b/src/Illuminate/Session/FileSessionHandler.php index e206d9ddfe89..4f72525804a0 100644 --- a/src/Illuminate/Session/FileSessionHandler.php +++ b/src/Illuminate/Session/FileSessionHandler.php @@ -68,7 +68,7 @@ public function read($sessionId) { if ($this->files->exists($path = $this->path.'/'.$sessionId)) { if (filemtime($path) >= Carbon::now()->subMinutes($this->minutes)->getTimestamp()) { - return $this->files->get($path); + return $this->files->get($path, true); } }