]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Security/LogoutSuccessHandler.php
Allow phone field to be optional
[airbundle] / Security / LogoutSuccessHandler.php
index de4d960327b5c3a1c7f14e677d71731d8504727f..c6ca529b95b6b503d9c126cdcc12ea39fee9c5e8 100644 (file)
@@ -9,8 +9,14 @@ use Symfony\Component\Routing\RouterInterface;
 use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface;
 
 class LogoutSuccessHandler implements LogoutSuccessHandlerInterface {
+       /**
+        * {@inheritdoc}
+        */
        protected $router;
 
+       /**
+        * {@inheritdoc}
+        */
        public function __construct(RouterInterface $router) {
                $this->router = $router;
        }
@@ -47,7 +53,7 @@ class LogoutSuccessHandler implements LogoutSuccessHandlerInterface {
                                }
 
                                //Remove route and controller from route defaults
-                               unset($route['_route'], $route['_controller']);
+                               unset($route['_route'], $route['_controller'], $route['_canonical_route']);
 
                                //Generate url
                                $url = $this->router->generate($name, $route);
@@ -71,7 +77,7 @@ class LogoutSuccessHandler implements LogoutSuccessHandlerInterface {
                                }
 
                                //Remove route and controller from route defaults
-                               unset($route['_route'], $route['_controller']);
+                               unset($route['_route'], $route['_controller'], $route['_canonical_route']);
 
                                //Generate url
                                $url = $this->router->generate($name, $route);
@@ -97,7 +103,7 @@ class LogoutSuccessHandler implements LogoutSuccessHandlerInterface {
                                $defaults = $route->getDefaults();
 
                                //Remove route and controller from route defaults
-                               unset($defaults['_route'], $defaults['_controller']);
+                               unset($defaults['_route'], $defaults['_controller'], $defaults['_canonical_route']);
 
                                //Generate url
                                $url = $this->router->generate($name, $defaults);