diff --git a/include/lassospkit_helper.inc.php b/include/lassospkit_helper.inc.php index 5f5647a..06f4831 100644 --- a/include/lassospkit_helper.inc.php +++ b/include/lassospkit_helper.inc.php @@ -51,6 +51,7 @@ class LassoSPKitHelper { and copy them into array $attributes. */ static function assertionExtractAttributes($assertion) { $attributes = array(); + if ($assertion->attributeStatement && array_length($assertion->attributeStatement)) { foreach ($assertion->attributeStatement[0]->attribute as $attribute) { if ($attribute->name == LASSO_SAML2_ATTRIBUTE_NAME_EPR) { continue; @@ -60,7 +61,8 @@ class LassoSPKitHelper { array_push($arr, $value->any[0]->content); } $attributes[$attribute->name] = $arr; - } + } + } return $attributes; } /** Return the NameID found in profile->nameIdentifier. If throw is TRUE