소스 검색

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