Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
59 | public function resume(string $id): void |
||
60 | { |
||
61 | session_id($id); |
||
62 | $started = session_start($this->options); |
||
63 | |||
64 | if (!$started) { |
||
65 | $err = error_get_last() ?? ['message' => 'Failed to start session']; |
||
66 | throw new ServerException($err['message'], 500); |
||
67 | } |
||
68 | |||
69 | if ($_SESSION === []) { |
||
70 | session_abort(); |
||
71 | throw new BrokerException("Session has expired. Client must attach with new token.", 401); |
||
72 | } |
||
83 |