Explorar el Código

[FrameworkBundle] made csrf_secret parameter optional

Fabien Potencier hace 14 años
padre
commit
74bc9d461b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

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