Skip to content
Snippets Groups Projects
Commit fbbb6ef8 authored by Victor Dubiniuk's avatar Victor Dubiniuk
Browse files

Init dummy session first

parent 6156d718
Branches
No related tags found
No related merge requests found
......@@ -288,14 +288,14 @@ class OC {
$cookie_path = OC::$WEBROOT ?: '/';
ini_set('session.cookie_path', $cookie_path);
//set the session object to a dummy session so code relying on the session existing still works
self::$session = new \OC\Session\Memory('');
try{
// set the session name to the instance id - which is unique
self::$session = new \OC\Session\Internal(OC_Util::getInstanceId());
// if session cant be started break with http 500 error
}catch (Exception $e){
//set the session object to a dummy session so code relying on the session existing still works
self::$session = new \OC\Session\Memory('');
OC_Log::write('core', 'Session could not be initialized',
OC_Log::ERROR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment