check fix if session start is successfull

This commit is contained in:
Robin Appelman 2013-05-28 01:13:36 +02:00
parent e73c04501e
commit f547b66d6b
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,8 @@ namespace OC\Session;
class Internal extends Memory {
public function __construct($name) {
session_name($name);
if (@session_start()) {
session_start();
if (!isset($_SESSION)) {
throw new \Exception('Failed to start session');
}
$this->data = $_SESSION;