Преглед на файлове

[FrameworkBundle] made csrf_secret parameter optional

Fabien Potencier преди 14 години
родител
ревизия
74bc9d461b
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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();
         }
     }