Skip to content
Snippets Groups Projects
Commit 95a1064f authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix mistake in 675e5ec9

parent b778b155
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ use SimpleSAML\{Auth, Logger};
use SimpleSAML\Assert\Assert;
use function array_key_exists;
use function boolval;
use function is_null;
use function is_string;
......@@ -47,21 +48,21 @@ class StatisticsWithAttribute extends Auth\ProcessingFilter
parent::__construct($config, $reserved);
if (array_key_exists('attributename', $config)) {
if (!is_string($this->attribute)) {
if (!is_string($config['attributename'])) {
throw new Exception('Invalid attribute name given to core:StatisticsWithAttribute filter.');
}
$this->attribute = $config['attributename'];
}
if (array_key_exists('type', $config)) {
if (!is_string($this->typeTag)) {
if (!is_string($config['type'])) {
throw new Exception('Invalid typeTag given to core:StatisticsWithAttribute filter.');
}
$this->typeTag = $config['type'];
}
if (array_key_exists('skipPassive', $config)) {
$this->skipPassive = (bool) $config['skipPassive'];
$this->skipPassive = boolval($config['skipPassive']);
}
}
......
......@@ -76,7 +76,7 @@ class TargetedID extends Auth\ProcessingFilter
$this->identifyingAttribute = $config['identifyingAttribute'];
if (array_key_exists('nameId', $config)) {
if (!is_bool($this->generateNameId)) {
if (!is_bool($config['nameId'])) {
throw new Exception('Invalid value of \'nameId\'-option to core:TargetedID filter.');
}
$this->generateNameId = $config['nameId'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment