From 8c18415ccb3d32db6e89ea00275425cc69793908 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 31 Oct 2019 12:21:35 +0100 Subject: [inc/Util] Add method to agressively unset a cookie This tries to work around problems with the cookie path and trailing slashes. --- inc/dictionary.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/dictionary.inc.php') diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php index 935d1f4e..b69007a6 100644 --- a/inc/dictionary.inc.php +++ b/inc/dictionary.inc.php @@ -28,7 +28,8 @@ class Dictionary //Changes the language in case there is a request to $lang = Request::get('lang'); if ($lang !== false && in_array($lang, self::$languages)) { - setcookie('lang', $lang, time() + 60 * 60 * 24 * 30 * 12); + Util::clearCookie('lang'); + setcookie('lang', $lang, time() + 86400 * 30 * 12); $url = Request::get('url'); if ($url === false && isset($_SERVER['HTTP_REFERER'])) { $url = $_SERVER['HTTP_REFERER']; -- cgit v1.2.3-55-g7522