1
1
Fork 0

Add support for empty session write

- Ignored empty data left session intact, leading to unexpected behaviors
This commit is contained in:
Hypolite Petovan 2020-08-07 22:50:16 -04:00
parent b3dcecf987
commit bc02ad89d0
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -94,7 +94,7 @@ class Database implements SessionHandlerInterface
}
if (!$session_data) {
return true;
return $this->destroy($session_id);
}
$expire = time() + Session::$expire;