From 9ad0f7dc38b9a22d0fc71de7b9bb7c0537fc794c Mon Sep 17 00:00:00 2001 From: max/sooulix Date: Wed, 12 Feb 2025 11:02:14 +0100 Subject: [PATCH] fix session_destroy quand il n'y a pas de session --- src/auth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/auth.php b/src/auth.php index 45148ae..bef003a 100644 --- a/src/auth.php +++ b/src/auth.php @@ -12,7 +12,10 @@ function login() if (isset($_POST['logout'])) { - session_destroy(); + if (session_id() != "") + { + session_destroy(); + } } session_start();