From e9ed079a6a3b51508273488c1f90fe95a47e9dcc Mon Sep 17 00:00:00 2001 From: Louis Charette Date: Mon, 24 Oct 2016 10:59:49 -0400 Subject: [PATCH] Fix empty session (#15998) 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); } }