This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Note about quick tour (FIX?).

About symfony tutorials, symfony book and API documentation.

Note about quick tour (FIX?).

by egor7 » Sat Jan 04, 2014 3:17 am

Current version 2.4. I try to compile a code on a page http://symfony.com/doc/current/quick_tour/the_controller.html into 'Persisting Data in the Session' section:
Code: Select all
public function indexAction(Request $request)
{
    $session = $this->request->getSession();

    // store an attribute for reuse during a later user request
    $session->set('foo', 'bar');

And found id doesn't work for my.
After correcting:
Code: Select all
$session = $this->request->getSession();
to
Code: Select all
$session = $request->getSession();
all works fine.
So I think it might be a error.
(If there a section like 'found e arror on site', please move this topic there.)
egor7
Junior Member
 
Posts: 3
Joined: Sat Jan 04, 2014 3:05 am