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

Fix UninitializedProperty 2x

parent 3680ec14
No related branches found
No related tags found
No related merge requests found
...@@ -20,13 +20,13 @@ class AttributeValueMap extends \SimpleSAML\Auth\ProcessingFilter ...@@ -20,13 +20,13 @@ class AttributeValueMap extends \SimpleSAML\Auth\ProcessingFilter
* The name of the attribute we should assign values to (ie: the target attribute). * The name of the attribute we should assign values to (ie: the target attribute).
* @var string * @var string
*/ */
private $targetattribute; private $targetattribute = '';
/** /**
* The name of the attribute we should create values from. * The name of the attribute we should create values from.
* @var string * @var string
*/ */
private $sourceattribute; private $sourceattribute = '';
/** /**
* The required $sourceattribute values and target affiliations. * The required $sourceattribute values and target affiliations.
...@@ -92,10 +92,10 @@ class AttributeValueMap extends \SimpleSAML\Auth\ProcessingFilter ...@@ -92,10 +92,10 @@ class AttributeValueMap extends \SimpleSAML\Auth\ProcessingFilter
} }
// now validate it // now validate it
if (!is_string($this->sourceattribute)) { if (!empty($this->sourceattribute)) {
throw new Error\Exception("AttributeValueMap: 'sourceattribute' configuration option not set."); 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."); throw new Error\Exception("AttributeValueMap: 'targetattribute' configuration option not set.");
} }
if (!is_array($this->values)) { if (!is_array($this->values)) {
......
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