From a903a67360bb844142ccb3e6b9a84953b5291a28 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 7 Sep 2021 15:37:41 +0200 Subject: [PATCH] Fix optional argument warning Fix undefined route variable --- Handler/LogoutSuccessHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Handler/LogoutSuccessHandler.php b/Handler/LogoutSuccessHandler.php index 825cd5b..4c194c5 100644 --- a/Handler/LogoutSuccessHandler.php +++ b/Handler/LogoutSuccessHandler.php @@ -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 -- 2.41.0