diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-27 05:07:14 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-27 05:07:14 -0700 |
commit | ce76d61957b22a70214d953f9580db61d09c5a66 (patch) | |
tree | 48eeeefecedaff3b1221c8b10086f01ec89a2a95 /lib | |
parent | a68722c9c75cd9dc8ed84e186f3b4ecc5556b1a3 (diff) |
marker in sessions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index f6d50b180..e5a8eaea0 100644 --- a/lib/util.php +++ b/lib/util.php @@ -139,8 +139,19 @@ function common_have_session() function common_ensure_session() { + $c = null; + if (array_key_exists(session_name, $_COOKIE)) { + $c = $_COOKIE[session_name()]; + } if (!common_have_session()) { @session_start(); + if (!isset($_SESSION['started'])) { + $_SESSION['started'] = time(); + if (!empty($c)) { + common_log(LOG_WARNING, 'Session cookie "' . $_COOKIE[session_name()] . '" ' . + ' is set but started value is null'); + } + } } } |