diff --git a/src/SAML2/Assertion.php b/src/SAML2/Assertion.php index d20ac3914a..2e8a0acc2d 100644 --- a/src/SAML2/Assertion.php +++ b/src/SAML2/Assertion.php @@ -920,7 +920,10 @@ public function decryptAttributes(XMLSecurityKey $key, array $blacklist = []): v } if (!array_key_exists($name, $this->attributes)) { - $this->attributes[$name] = []; + $attr = new Attribute(); + $attr->setName($name); + + $this->attributes[$name] = $attr; } $this->parseAttributeValue($attribute, $name);