From 71cafbc54c914217a9ff3d140d0cd8dda3ac751e Mon Sep 17 00:00:00 2001 From: Mark Ogilvie Date: Fri, 24 Jun 2022 12:57:32 +0100 Subject: [PATCH] Initially set user null. getUser is ?UserInterface return, but throws unset user exception. Typed property Symfony\Component\Security\Core\Exception\AccountStatusException::$user must not be accessed before initialization --- .../Security/Core/Exception/AccountStatusException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php b/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php index b3263cbca5fc3..76878f9ff2916 100644 --- a/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php +++ b/src/Symfony/Component/Security/Core/Exception/AccountStatusException.php @@ -22,7 +22,7 @@ */ abstract class AccountStatusException extends AuthenticationException { - private UserInterface $user; + private ?UserInterface $user = null; /** * Get the user.