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(); } }