From affcad0948ecc263ab572b858c618a23c4adf5b9 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 19 Apr 2012 08:19:15 -0500 Subject: [PATCH] fix bug surrounding cookie session driver. --- laravel/session/drivers/driver.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/laravel/session/drivers/driver.php b/laravel/session/drivers/driver.php index 03e6fb2c..a8b9d4de 100644 --- a/laravel/session/drivers/driver.php +++ b/laravel/session/drivers/driver.php @@ -55,6 +55,14 @@ public function id() { $session = array(); + // If the driver is an instance of the Cookie driver, we are able to + // just return any string since the Cookie driver has no real idea + // of a server side persisted session with an ID. + if ($this instanceof Cookie) + { + return Str::random(40); + } + // We'll containue generating random IDs until we find an ID that is // not currently assigned to a session. This is almost definitely // going to happen on the first iteration.