do a backtrace when we ca;; generateAuthHash without open session

This commit is contained in:
Isaac Connor 2017-10-10 11:51:35 -04:00
parent d0f0ab1afe
commit 7f73f0bf8c
1 changed files with 4 additions and 1 deletions

View File

@ -161,7 +161,10 @@ function generateAuthHash( $useRemoteAddr ) {
}
$auth = md5( $authKey );
if ( session_status() == PHP_SESSION_NONE ) {
Warning("Session is not active. AuthHash will not be cached.");
$backTrace = debug_backtrace();
$file = $backTrace[1]['file'];
$line = $backTrace[1]['line'];
Warning("Session is not active. AuthHash will not be cached. called from $file:$line");
}
$_SESSION['AuthHash'] = $auth;
$_SESSION['AuthHashGeneratedAt'] = time();