From 005b40ce9915522372e59b909992e0a7b95952e3 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 24 Jan 2021 23:55:38 +0100 Subject: [PATCH] Do not remove a non existing cookie Signed-off-by: William Desportes --- libraries/classes/Core.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/classes/Core.php b/libraries/classes/Core.php index 834ed769edc0..641a47982cdd 100644 --- a/libraries/classes/Core.php +++ b/libraries/classes/Core.php @@ -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']); } @@ -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']); } }