Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 30850d4

Browse files
committed
Merge branch '2.6' into 2.7
* 2.6: [Yaml] throw a ParseException on invalid data type #15331 add infos about deprecated classes to UPGRADE-3.0 [Security] removed useless else condition in SwitchUserListener class. [travis] Tests deps=low with PHP 5.6 [Console] Fix console output with closed stdout
2 parents 9aa9f48 + cdad268 commit 30850d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Http/Firewall/SwitchUserListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ private function attemptSwitchUser(Request $request)
115115
if (false !== $originalToken) {
116116
if ($token->getUsername() === $request->get($this->usernameParameter)) {
117117
return $token;
118-
} else {
119-
throw new \LogicException(sprintf('You are already switched to "%s" user.', $token->getUsername()));
120118
}
119+
120+
throw new \LogicException(sprintf('You are already switched to "%s" user.', $token->getUsername()));
121121
}
122122

123123
if (false === $this->accessDecisionManager->decide($token, array($this->role))) {

0 commit comments

Comments
 (0)