From d4dbdd7e85c9f1f65b75a67b28c3f350e11bd1bb 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 86a247111..cb6f8ebd0 100644 --- a/modules/core/lib/Auth/Process/AttributeValueMap.php +++ b/modules/core/lib/Auth/Process/AttributeValueMap.php @@ -19,13 +19,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. @@ -93,10 +93,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