Skip to content
Snippets Groups Projects
Commit 73c68107 authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge pull request #571 from protich/issue/close_session_on_shutdown


Register session close on shutdown at the start of session handling

Reviewed-By: default avatarJared Hancock <jared@osticket.com>
parents 23daa5de d4b2aa3e
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,12 @@ class osTicketSession {
if(!$this->ttl)
$this->ttl=SESSION_TTL;
// Set osTicket specific session name.
session_name('OSTSESSID');
// Forced cleanup on shutdown
register_shutdown_function('session_write_close');
if (OsticketConfig::getDBVersion())
return session_start();
......@@ -56,8 +60,6 @@ class osTicketSession {
array(&$this, 'destroy'),
array(&$this, 'gc')
);
//Forced cleanup.
register_shutdown_function('session_write_close');
//Start the session.
session_start();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment