File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
src/Symfony/Component/Security Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ Security
65
65
* Using the `AdvancedUserInterface` is now deprecated. To use the existing
66
66
functionality, create a custom user-checker based on the
67
67
` Symfony\C omponent\S ecurity\C ore\User\User Checker` .
68
+ * `AuthenticationUtils::getLastUsername()` now always returns a string.
68
69
69
70
SecurityBundle
70
71
--------------
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ CHANGELOG
9
9
* Using the AdvancedUserInterface is now deprecated. To use the existing
10
10
functionality, create a custom user-checker based on the
11
11
` Symfony\Component\Security\Core\User\UserChecker ` .
12
+ * ` AuthenticationUtils::getLastUsername() ` now always returns a string.
12
13
13
14
4.0.0
14
15
-----
Original file line number Diff line number Diff line change @@ -62,12 +62,12 @@ public function getLastUsername()
62
62
$ request = $ this ->getRequest ();
63
63
64
64
if ($ request ->attributes ->has (Security::LAST_USERNAME )) {
65
- return $ request ->attributes ->get (Security::LAST_USERNAME );
65
+ return $ request ->attributes ->get (Security::LAST_USERNAME , '' );
66
66
}
67
67
68
68
$ session = $ request ->getSession ();
69
69
70
- return null === $ session ? '' : $ session ->get (Security::LAST_USERNAME );
70
+ return null === $ session ? '' : $ session ->get (Security::LAST_USERNAME , '' );
71
71
}
72
72
73
73
/**
You can’t perform that action at this time.
0 commit comments