From: Evan Prodromou Date: Sat, 27 Jun 2009 12:07:14 +0000 (-0700) Subject: marker in sessions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ce76d61957b22a70214d953f9580db61d09c5a66;p=quix0rs-gnu-social.git marker in sessions --- diff --git a/lib/util.php b/lib/util.php index f6d50b1807..e5a8eaea06 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'); + } + } } }