diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-06-18 14:58:06 +0200 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-06-18 14:58:06 +0200 |
commit | 8c1c6eff4059a084f7f60a13da604af074badd79 (patch) | |
tree | 1fd42cbd273d70be148b9e1c321db5fa85b6df04 /Http/RememberMe | |
parent | 6f969fb6dd0f9d7aecf8e0118563af2aa4796a17 (diff) | |
parent | 36cde602d02d84b7a176912a8e01ed8e3c7ab85c (diff) | |
download | symfony-security-8c1c6eff4059a084f7f60a13da604af074badd79.zip symfony-security-8c1c6eff4059a084f7f60a13da604af074badd79.tar.gz symfony-security-8c1c6eff4059a084f7f60a13da604af074badd79.tar.bz2 |
Merge branch '2.3' into 2.6
* 2.3:
[2.3][Debug] Fix fatal-errors handling on HHVM
Standardize the name of the exception variables
[2.3] Static Code Analysis for Components
Remove duplicated paths
Conflicts:
src/Symfony/Component/Debug/ErrorHandler.php
src/Symfony/Component/HttpFoundation/Session/Storage/MockArraySessionStorage.php
src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
src/Symfony/Component/Security/Core/Authentication/Provider/UserAuthenticationProvider.php
Diffstat (limited to 'Http/RememberMe')
-rw-r--r-- | Http/RememberMe/AbstractRememberMeServices.php | 12 | ||||
-rw-r--r-- | Http/RememberMe/TokenBasedRememberMeServices.php | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Http/RememberMe/AbstractRememberMeServices.php b/Http/RememberMe/AbstractRememberMeServices.php index 16f7831..1ba2df6 100644 --- a/Http/RememberMe/AbstractRememberMeServices.php +++ b/Http/RememberMe/AbstractRememberMeServices.php @@ -123,21 +123,21 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface } return new RememberMeToken($user, $this->providerKey, $this->key); - } catch (CookieTheftException $theft) { + } catch (CookieTheftException $e) { $this->cancelCookie($request); - throw $theft; - } catch (UsernameNotFoundException $notFound) { + throw $e; + } catch (UsernameNotFoundException $e) { if (null !== $this->logger) { $this->logger->info('User for remember-me cookie not found.'); } - } catch (UnsupportedUserException $unSupported) { + } catch (UnsupportedUserException $e) { if (null !== $this->logger) { $this->logger->warning('User class for remember-me cookie not supported.'); } - } catch (AuthenticationException $invalid) { + } catch (AuthenticationException $e) { if (null !== $this->logger) { - $this->logger->debug('Remember-Me authentication failed: '.$invalid->getMessage()); + $this->logger->debug('Remember-Me authentication failed: '.$e->getMessage()); } } diff --git a/Http/RememberMe/TokenBasedRememberMeServices.php b/Http/RememberMe/TokenBasedRememberMeServices.php index 65bac0a..d68ada5 100644 --- a/Http/RememberMe/TokenBasedRememberMeServices.php +++ b/Http/RememberMe/TokenBasedRememberMeServices.php @@ -42,12 +42,12 @@ class TokenBasedRememberMeServices extends AbstractRememberMeServices } try { $user = $this->getUserProvider($class)->loadUserByUsername($username); - } catch (\Exception $ex) { - if (!$ex instanceof AuthenticationException) { - $ex = new AuthenticationException($ex->getMessage(), $ex->getCode(), $ex); + } catch (\Exception $e) { + if (!$e instanceof AuthenticationException) { + $e = new AuthenticationException($e->getMessage(), $e->getCode(), $e); } - throw $ex; + throw $e; } if (!$user instanceof UserInterface) { |