Skip to content

Commit b4acb79

Browse files
committed
Fix Psalm issues
1 parent 3f4dc6a commit b4acb79

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

www/consentAdmin.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ function driveProcessingChain(
5454
];
5555
/* we're being bridged, so add that info to the state */
5656
if (strpos($source, '-idp-remote|') !== false) {
57-
$authProcState['saml:sp:IdP'] = substr($source, strpos($source, '|') + 1);
57+
/** @var int $i */
58+
$i = strpos($source, '|');
59+
$authProcState['saml:sp:IdP'] = substr($source, $i + 1);
5860
}
5961

6062
/*
@@ -217,8 +219,9 @@ function driveProcessingChain(
217219
$rowcount = $consent_storage->deleteConsent($hashed_user_id, $targeted_id);
218220
if ($rowcount > 0) {
219221
$res = $translator->t("removed");
222+
} else {
223+
throw new \Exception("Unknown action (should not happen)");
220224
}
221-
// Unknown action (should not happen)
222225
} else {
223226
\SimpleSAML\Logger::info('consentAdmin: unknown action');
224227
$res = $translator->t("unknown");
@@ -246,6 +249,7 @@ function driveProcessingChain(
246249
$translator->includeLanguageFile('attributes'); // attribute listings translated by this dictionary
247250

248251
$sp_empty_description = $translator->getTag('sp_empty_description');
252+
$sp_list = [];
249253

250254
// Process consents for all SP
251255
foreach ($all_sp_metadata as $sp_entityid => $sp_values) {

0 commit comments

Comments
 (0)