Skip to content

Commit

Permalink
Do not remove a non existing cookie
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Jan 24, 2021
1 parent 657f83a commit 005b40c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/classes/Core.php
Expand Up @@ -1364,7 +1364,9 @@ public static function setGotoAndBackGlobals(ContainerInterface $container, Conf
$container->setParameter('goto', $goto);
$container->setParameter('url_params', $url_params);
} else {
$config->removeCookie('goto');
if ($config->issetCookie('goto')) {
$config->removeCookie('goto');
}
unset($_REQUEST['goto'], $_GET['goto'], $_POST['goto']);
}

Expand All @@ -1373,7 +1375,9 @@ public static function setGotoAndBackGlobals(ContainerInterface $container, Conf
$back = $_REQUEST['back'];
$container->setParameter('back', $back);
} else {
$config->removeCookie('back');
if ($config->issetCookie('back')) {
$config->removeCookie('back');
}
unset($_REQUEST['back'], $_GET['back'], $_POST['back']);
}
}
Expand Down

0 comments on commit 005b40c

Please sign in to comment.