]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Handler/LogoutSuccessHandler.php
Fix optional argument warning
[userbundle] / Handler / LogoutSuccessHandler.php
index 825cd5b69bd5a7f973a0ad9b78185b5fca4ede3e..4c194c5be8df25f96ec95f0eb559bbe5eb5f8d35 100644 (file)
@@ -47,7 +47,7 @@ class LogoutSuccessHandler extends DefaultLogoutSuccessHandler {
         *
         * {@inheritdoc}
         */
-       public function __construct(ContainerInterface $container, string $targetUrl = '/', RouterInterface $router) {
+       public function __construct(ContainerInterface $container, string $targetUrl, RouterInterface $router) {
                //Set config
                $this->config = $container->getParameter(self::getAlias());
 
@@ -123,7 +123,7 @@ class LogoutSuccessHandler extends DefaultLogoutSuccessHandler {
                //With index route from config
                if (!empty($name = $this->config['route']['index']['name']) && is_array($context = $this->config['route']['index']['context'])) {
                        //Without logout route name
-                       if (($name = $route['_route']) != $logout) {
+                       if ($name != $logout) {
                                //Try index route
                                try {
                                        //Generate url