[HttpFoundation] Fix session::remove() not initializing the session
This commit is contained in:
parent
568cd57da6
commit
d28b9ddcda
@ -150,11 +150,10 @@ class Session implements \Serializable
|
||||
*/
|
||||
public function remove($name)
|
||||
{
|
||||
if (false === $this->started) {
|
||||
$this->start();
|
||||
}
|
||||
if (array_key_exists($name, $this->attributes)) {
|
||||
if (false === $this->started) {
|
||||
$this->start();
|
||||
}
|
||||
|
||||
unset($this->attributes[$name]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user