Skip to content
Snippets Groups Projects
Commit e73c0450 authored by Robin Appelman's avatar Robin Appelman
Browse files

Fix session not working error

parent 44f9af5a
Branches
No related tags found
No related merge requests found
......@@ -293,6 +293,9 @@ class OC {
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);
......
......@@ -17,7 +17,6 @@ namespace OC\Session;
*/
class Internal extends Memory {
public function __construct($name) {
session_write_close();
session_name($name);
if (@session_start()) {
throw new \Exception('Failed to start session');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment