Add support for empty session write
- Ignored empty data left session intact, leading to unexpected behaviors
This commit is contained in:
parent
b3dcecf987
commit
bc02ad89d0
|
@ -87,7 +87,7 @@ class Cache implements SessionHandlerInterface
|
|||
}
|
||||
|
||||
if (!$session_data) {
|
||||
return true;
|
||||
return $this->destroy($session_id);
|
||||
}
|
||||
|
||||
return $this->cache->set('session:' . $session_id, $session_data, Session::$expire);
|
||||
|
|
|
@ -94,7 +94,7 @@ class Database implements SessionHandlerInterface
|
|||
}
|
||||
|
||||
if (!$session_data) {
|
||||
return true;
|
||||
return $this->destroy($session_id);
|
||||
}
|
||||
|
||||
$expire = time() + Session::$expire;
|
||||
|
|
Loading…
Reference in New Issue
Block a user