From 74bc9d461bb60e7fedd6ddf8abf2454a7e312c48 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 10 Sep 2010 19:32:17 +0200 Subject: [PATCH] [FrameworkBundle] made csrf_secret parameter optional --- src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php index 274e7e4f92..15caa4197e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php @@ -26,8 +26,8 @@ class FrameworkBundle extends Bundle */ public function boot() { - if ($secret = $this->container->getParameter('csrf_secret')) { - Form::setDefaultCsrfSecret($secret); + if ($this->container->hasParameter('csrf_secret')) { + Form::setDefaultCsrfSecret($this->container->getParameter('csrf_secret')); Form::enableDefaultCsrfProtection(); } }