Skip to content

Commit 56e0bcb

Browse files
mogilviefabpot
authored andcommitted
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
1 parent 5dc2a87 commit 56e0bcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Exception/AccountStatusException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
abstract class AccountStatusException extends AuthenticationException
2424
{
25-
private UserInterface $user;
25+
private ?UserInterface $user = null;
2626

2727
/**
2828
* Get the user.

0 commit comments

Comments
 (0)