Explorar o código

[FrameworkBundle] made csrf_secret parameter optional

Fabien Potencier %!s(int64=14) %!d(string=hai) anos
pai
achega
74bc9d461b
Modificáronse 1 ficheiros con 2 adicións e 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();
         }
     }