From 09390a50cdc168197a5b1362c0c50ee5d5da400b Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Thu, 23 Jan 2020 19:51:14 +0100 Subject: [PATCH] Session cookie setting being set while session is active Trying to do will raise a warning since PHP 7.2, and it never worked as intented. See: https://bugs.php.net/bug.php\?id\=75650 --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index a39fc762..6a82d571 100644 --- a/index.php +++ b/index.php @@ -243,7 +243,9 @@ if (isset($_POST['login'])) { } // Send cookie with the new expiration date to the browser + session_destroy(); session_set_cookie_params($expirationTime, $cookiedir, $_SERVER['SERVER_NAME']); + session_start(); session_regenerate_id(true); // Optional redirect after login: -- 2.41.0