summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/include/session.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/session.inc b/program/include/session.inc
index 8a98fadde..a29eabba9 100644
--- a/program/include/session.inc
+++ b/program/include/session.inc
@@ -173,8 +173,8 @@ function sess_regenerate_id()
session_id($random);
$cookie = session_get_cookie_params();
- setcookie(session_name(), "", time() -3600);
- setcookie(session_name(), $random, $cookie['lifetime'], $cookie['path']);
+ setcookie(session_name(), "", time() - 3600);
+ setcookie(session_name(), $random, $cookie['lifetime'] ? time() + $cookie['lifetime'] : 0, $cookie['path']);
return true;
}