diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-01-23 19:51:14 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-01-23 19:51:14 +0100 |
commit | 09390a50cdc168197a5b1362c0c50ee5d5da400b (patch) | |
tree | 37ac5eb662bc71079d3ab59dd788b12168ee8656 | |
parent | 57bd9780c8bb58e150853c91c97001c299932807 (diff) | |
download | Shaarli-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
-rw-r--r-- | index.php | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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: |