Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | public function start(): void |
||
42 | { |
||
43 | $started = session_status() !== PHP_SESSION_ACTIVE |
||
44 | ? session_start($this->options) |
||
45 | : true; |
||
46 | |||
47 | if (!$started) { |
||
48 | $err = error_get_last() ?? ['message' => 'Failed to start session']; |
||
49 | throw new ServerException($err['message'], 500); |
||
50 | } |
||
51 | |||
52 | // Session shouldn't be empty when resumed. |
||
53 | $_SESSION['_sso_init'] = 1; |
||
54 | } |
||
83 |