From e62fc06b5bf88a5d00aeda4517ddf6b64df4327b Mon Sep 17 00:00:00 2001 From: Tim van Dijen <tvdijen@gmail.com> Date: Tue, 5 May 2020 23:31:49 +0200 Subject: [PATCH] Fix UninitializedProperty 2x --- modules/core/lib/Auth/Process/AttributeValueMap.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/lib/Auth/Process/AttributeValueMap.php b/modules/core/lib/Auth/Process/AttributeValueMap.php index fddd85b8e..a3e9f5626 100644 --- a/modules/core/lib/Auth/Process/AttributeValueMap.php +++ b/modules/core/lib/Auth/Process/AttributeValueMap.php @@ -20,13 +20,13 @@ class AttributeValueMap extends \SimpleSAML\Auth\ProcessingFilter * The name of the attribute we should assign values to (ie: the target attribute). * @var string */ - private $targetattribute; + private $targetattribute = ''; /** * The name of the attribute we should create values from. * @var string */ - private $sourceattribute; + private $sourceattribute = ''; /** * The required $sourceattribute values and target affiliations. @@ -92,10 +92,10 @@ class AttributeValueMap extends \SimpleSAML\Auth\ProcessingFilter } // now validate it - if (!is_string($this->sourceattribute)) { + if (!empty($this->sourceattribute)) { throw new Error\Exception("AttributeValueMap: 'sourceattribute' configuration option not set."); } - if (!is_string($this->targetattribute)) { + if (!empty($this->targetattribute)) { throw new Error\Exception("AttributeValueMap: 'targetattribute' configuration option not set."); } if (!is_array($this->values)) { -- GitLab