Skip to content

Commit

Permalink
Add missing dot at the end of an exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
rybakit committed Jun 24, 2014
1 parent 55934aa commit 8e1f978
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -70,7 +70,7 @@ public function authenticate(TokenInterface $token)
$user = $this->retrieveUser($username, $token);
} catch (UsernameNotFoundException $notFound) {
if ($this->hideUserNotFoundExceptions) {
throw new BadCredentialsException('Bad credentials', 0, $notFound);
throw new BadCredentialsException('Bad credentials.', 0, $notFound);
}
$notFound->setUsername($username);

Expand All @@ -87,7 +87,7 @@ public function authenticate(TokenInterface $token)
$this->userChecker->checkPostAuth($user);
} catch (BadCredentialsException $e) {
if ($this->hideUserNotFoundExceptions) {
throw new BadCredentialsException('Bad credentials', 0, $e);
throw new BadCredentialsException('Bad credentials.', 0, $e);
}

throw $e;
Expand Down

2 comments on commit 8e1f978

@raziel057
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stof
Copy link
Member

@stof stof commented on 8e1f978 Apr 28, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raziel057 the recommended way to display translated messages to the end user as of Symfony 2.2 is not to use the exception message (which may not always be safe as it can be a message coming from a PDO exception if your query to load users is broken for instance).

Please sign in to comment.