Skip to content

Commit

Permalink
Updated references to new Session()
Browse files Browse the repository at this point in the history
If you use new Session(), you get a 500 error, with the following message:

```log
Failed to start the session: already started by PHP.
```
  • Loading branch information
scottwarren committed Apr 7, 2014
1 parent 1172b7d commit 490efdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/http_foundation/sessions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Quick example::

use Symfony\Component\HttpFoundation\Session\Session;

$session = new Session();
$session = $this->getRequest()->getSession();
$session->start();

// set and get session attributes
Expand Down Expand Up @@ -291,7 +291,7 @@ Examples of setting multiple flashes::

use Symfony\Component\HttpFoundation\Session\Session;

$session = new Session();
$session = $this->getRequest()->getSession();
$session->start();

// add flash messages
Expand Down

0 comments on commit 490efdc

Please sign in to comment.