Skip to content

Commit 95a1064

Browse files
committed
Fix mistake in 675e5ec
1 parent b778b15 commit 95a1064

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

modules/core/src/Auth/Process/StatisticsWithAttribute.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use SimpleSAML\Assert\Assert;
1010

1111
use function array_key_exists;
12+
use function boolval;
1213
use function is_null;
1314
use function is_string;
1415

@@ -47,21 +48,21 @@ public function __construct(array &$config, $reserved)
4748
parent::__construct($config, $reserved);
4849

4950
if (array_key_exists('attributename', $config)) {
50-
if (!is_string($this->attribute)) {
51+
if (!is_string($config['attributename'])) {
5152
throw new Exception('Invalid attribute name given to core:StatisticsWithAttribute filter.');
5253
}
5354
$this->attribute = $config['attributename'];
5455
}
5556

5657
if (array_key_exists('type', $config)) {
57-
if (!is_string($this->typeTag)) {
58+
if (!is_string($config['type'])) {
5859
throw new Exception('Invalid typeTag given to core:StatisticsWithAttribute filter.');
5960
}
6061
$this->typeTag = $config['type'];
6162
}
6263

6364
if (array_key_exists('skipPassive', $config)) {
64-
$this->skipPassive = (bool) $config['skipPassive'];
65+
$this->skipPassive = boolval($config['skipPassive']);
6566
}
6667
}
6768

modules/core/src/Auth/Process/TargetedID.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct(array &$config, $reserved)
7676
$this->identifyingAttribute = $config['identifyingAttribute'];
7777

7878
if (array_key_exists('nameId', $config)) {
79-
if (!is_bool($this->generateNameId)) {
79+
if (!is_bool($config['nameId'])) {
8080
throw new Exception('Invalid value of \'nameId\'-option to core:TargetedID filter.');
8181
}
8282
$this->generateNameId = $config['nameId'];

0 commit comments

Comments
 (0)