Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a588c76

Browse filesBrowse files
committed
AuthenticationUtils::getLastUsername()` now always returns a string.
1 parent 3ef76bf commit a588c76
Copy full SHA for a588c76

File tree

2 files changed

+3
-2
lines changed
Filter options

2 files changed

+3
-2
lines changed

‎src/Symfony/Component/Security/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CHANGELOG
1010
functionality, create a custom user-checker based on the
1111
`Symfony\Component\Security\Core\User\UserChecker`. This functionality will
1212
be removed in Symfony 5.0.
13+
* `AuthenticationUtils::getLastUsername()` now always returns a string.
1314

1415
4.0.0
1516
-----

‎src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ public function getLastUsername()
6262
$request = $this->getRequest();
6363

6464
if ($request->attributes->has(Security::LAST_USERNAME)) {
65-
return $request->attributes->get(Security::LAST_USERNAME);
65+
return $request->attributes->get(Security::LAST_USERNAME, '');
6666
}
6767

6868
$session = $request->getSession();
6969

70-
return null === $session ? '' : $session->get(Security::LAST_USERNAME);
70+
return null === $session ? '' : $session->get(Security::LAST_USERNAME, '');
7171
}
7272

7373
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.