From 0c51d46cdf5bc84ccdb9b95543985511d98234b7 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Tue, 30 Apr 2024 15:58:42 +0200 Subject: [PATCH] auth.php: check if the cookie is set before deletion --- inc/mod/auth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/mod/auth.php b/inc/mod/auth.php index d9073b50..4cc20df5 100644 --- a/inc/mod/auth.php +++ b/inc/mod/auth.php @@ -168,7 +168,10 @@ function destroyCookies() { ]; foreach ($options_multi as $name => $options) { - setcookie($name, 'deleted', $options); + if (isset($_COOKIE[$name])) { + setcookie($name, 'deleted', $options); + unset($_COOKIE[$name]); + } } }