Merge #16591 - Do not remove a non existing cookie

Pull-request: #16591

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-01-28 15:18:17 +01:00
commit f888e1699c
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -1364,7 +1364,9 @@ class Core
$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']);
}
@ -1373,7 +1375,9 @@ class Core
$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']);
}
}