8000 [FrameworkBundle] made csrf_secret parameter optional · alexfilatov/symfony@74bc9d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 74bc9d4

Browse files
committed
[FrameworkBundle] made csrf_secret parameter optional
1 parent 7760223 commit 74bc9d4

File tree

1 file changed

+2
- file changed
+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class FrameworkBundle extends Bundle
2626
*/
2727
public function boot()
2828
{
29-
if ($secret = $this->container->getParameter('csrf_secret')) {
30-
Form::setDefaultCsrfSecret($secret);
29+
if ($this->container->hasParameter('csrf_secret')) {
30+
Form::setDefaultCsrfSecret($this->container->getParameter('csrf_secret'));
3131
Form::enableDefaultCsrfProtection();
3232
}
3333
}

0 commit comments

Comments
 (0)
0