Skip to content

Commit a3801f2

Browse files
committed
Fix some warnings
1 parent ce3779b commit a3801f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Security/BruteForceLoginFormAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private function getCredentials(Request $request): array
137137

138138
$credentials['username'] = trim($credentials['username']);
139139

140-
if (\strlen($credentials['username']) > UserBadge::MAX_USERNAME_LENGTH) {
140+
if (\strlen($credentials['username']) > UserBadge::MAX_USERNAME_LENGTH || '' === $credentials['username']) {
141141
throw new BadCredentialsException('Invalid username.');
142142
}
143143

0 commit comments

Comments
 (0)