Skip to content

Commit

Permalink
fix sytax error
Browse files Browse the repository at this point in the history
  • Loading branch information
w-ensink committed Dec 2, 2024
1 parent a4c2c49 commit dcd8eb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ function map_saml_attributes($saml_attributes) {
$irma_attributes = [];
foreach ($MAP_IRMA_SAML_ATTRIBUTES as $irma_key => $saml_key) {
$file = "/var/simplesamlphp/log/caesar.log";
file_put_contents($file, "52: " .. json_encode($saml_key, JSON_PRETTY_PRINT), FILE_APPEND);
file_put_contents($file, "52: " . json_encode($saml_key, JSON_PRETTY_PRINT), FILE_APPEND);

$value = NULL;
if (isset($saml_attributes[$saml_key]) &&
count($saml_attributes[$saml_key]) > 0 &&
$saml_attributes[$saml_key] !== NULL) {
$value = $saml_attributes[$saml_key][0];
file_put_contents($file, "59: " .. $irma_key .. ", " .. $value, FILE_APPEND);
file_put_contents($file, "59: " . $irma_key . ", " . $value, FILE_APPEND);
}
if ($irma_key === 'dateofbirth') {
if (preg_match('#^[0-9]{2}/[0-9]{2}/[0-9]{4}$#', $value)) {
Expand All @@ -68,9 +68,9 @@ function map_saml_attributes($saml_attributes) {
}
if ($value !== NULL) {
$irma_attributes[$irma_key] = $value;
file_put_contents($file, "71: " .. $irma_key .. ", " .. $value, FILE_APPEND);
file_put_contents($file, "71: " . $irma_key . ", " . $value, FILE_APPEND);
} else {
file_put_contents($file, "73: " .. $irma_key .. ", " .. $value .. " = NULL", FILE_APPEND);
file_put_contents($file, "73: " . $irma_key . ", " . $value . " = NULL", FILE_APPEND);
}
}

Expand Down

0 comments on commit dcd8eb8

Please sign in to comment.