Skip to content

Commit

Permalink
Make sure session is saved after changing (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Mar 12, 2024
1 parent 092217f commit ce971ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/SymfonyHttpDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function isSessionStarted()
public function setSessionValue($name, $value)
{
$this->session->put($name, $value);
$this->saveSession();
}

/**
Expand All @@ -75,5 +76,12 @@ public function getSessionValue($name)
public function deleteSessionValue($name)
{
$this->session->remove($name);
$this->saveSession();
}

protected function saveSession()
{
$this->session->reflash();
$this->session->save();
}
}

0 comments on commit ce971ee

Please sign in to comment.