diff options
Diffstat (limited to 'lib/private/session/internal.php')
-rw-r--r-- | lib/private/session/internal.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/session/internal.php b/lib/private/session/internal.php index 01d4569fd81..0b6152acf12 100644 --- a/lib/private/session/internal.php +++ b/lib/private/session/internal.php @@ -41,7 +41,11 @@ class Internal extends Session { public function __construct($name) { session_name($name); set_error_handler(array($this, 'trapError')); - session_start(); + try { + session_start(); + } catch (\Exception $e) { + setcookie(session_name(), null, -1, \OC::$WEBROOT ? : '/'); + } restore_error_handler(); if (!isset($_SESSION)) { throw new \Exception('Failed to start session'); |