From fff25ce2b37344f98f902ac5de37ed3704b065b2 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Sun, 25 May 2014 23:09:07 +0100 Subject: [PATCH] Add a missing argument to the PdoSessionHandler. --- components/http_foundation/session_configuration.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index ca1332cfaa1..bcd992128eb 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -83,7 +83,8 @@ Example usage:: use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler; - $storage = new NativeSessionStorage(array(), new PdoSessionHandler()); + $pdo = new \PDO('mysql:dbname=testdb;host=127.0.0.1'); + $storage = new NativeSessionStorage(array(), new PdoSessionHandler($pdo)); $session = new Session($storage); Configuring PHP Sessions