aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-01-23 19:51:14 +0100
committerArthurHoaro <arthur@hoa.ro>2020-01-23 19:51:14 +0100
commit09390a50cdc168197a5b1362c0c50ee5d5da400b (patch)
tree37ac5eb662bc71079d3ab59dd788b12168ee8656 /index.php
parent57bd9780c8bb58e150853c91c97001c299932807 (diff)
downloadShaarli-09390a50cdc168197a5b1362c0c50ee5d5da400b.tar.gz
Shaarli-09390a50cdc168197a5b1362c0c50ee5d5da400b.tar.zst
Shaarli-09390a50cdc168197a5b1362c0c50ee5d5da400b.zip
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
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 2 insertions, 0 deletions
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'])) {
243 } 243 }
244 244
245 // Send cookie with the new expiration date to the browser 245 // Send cookie with the new expiration date to the browser
246 session_destroy();
246 session_set_cookie_params($expirationTime, $cookiedir, $_SERVER['SERVER_NAME']); 247 session_set_cookie_params($expirationTime, $cookiedir, $_SERVER['SERVER_NAME']);
248 session_start();
247 session_regenerate_id(true); 249 session_regenerate_id(true);
248 250
249 // Optional redirect after login: 251 // Optional redirect after login: