From 37fbbca086ae9f7519ed95f141becb1110a6e091 Mon Sep 17 00:00:00 2001 From: Gaylord Poillon Date: Fri, 9 Feb 2018 14:55:34 +0100 Subject: [PATCH] isCsrfTokenValid() replace string by ?string --- .../Bundle/FrameworkBundle/Controller/ControllerTrait.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php index 6fc94bc8a2..1fb263f00f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php @@ -370,12 +370,12 @@ trait ControllerTrait /** * Checks the validity of a CSRF token. * - * @param string $id The id used when generating the token - * @param string $token The actual token sent with the request that should be validated + * @param string $id The id used when generating the token + * @param string|null $token The actual token sent with the request that should be validated * * @final since version 3.4 */ - protected function isCsrfTokenValid(string $id, string $token): bool + protected function isCsrfTokenValid(string $id, ?string $token): bool { if (!$this->container->has('security.csrf.token_manager')) { throw new \LogicException('CSRF protection is not enabled in your application. Enable it with the "csrf_protection" key in "config/packages/framework.yaml".');