Skip to content

Commit 51707b0

Browse files
committed
Psalm issues
1 parent 3761d3a commit 51707b0

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Client
2323
/**
2424
* The CDC server we send requests to.
2525
*
26-
* @var Server|null
26+
* @var Server
2727
*/
2828
private $server;
2929

www/resume.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
if (!isset($response['id'])) {
1616
throw new \SimpleSAML\Error\BadRequest('CDCResponse without id.');
1717
}
18-
$state = \SimpleSAML\Auth\State::loadState($response['id'], 'cdc:resume');
1918

20-
\SimpleSAML\Auth\ProcessingChain::resumeProcessing($state);
19+
$state = \SimpleSAML\Auth\State::loadState($response['id'], 'cdc:resume');
20+
if (!is_null($state)) {
21+
\SimpleSAML\Auth\ProcessingChain::resumeProcessing($state);
22+
} else {
23+
throw new \SimpleSAML\Error\NoState();
24+
}

0 commit comments

Comments
 (0)