Skip to content

Commit

Permalink
Fix #487. Enable strict check on in_array method
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Sep 6, 2021
1 parent 6f4cf30 commit 107757b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Saml2/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ private function _getAttributesByKeyName($keyName = "Name")
continue;
}
$attributeKeyName = $attributeKeyNode->nodeValue;
if (in_array($attributeKeyName, array_keys($attributes))) {
if (in_array($attributeKeyName, array_keys($attributes), true)) {
if (!$allowRepeatAttributeName) {
throw new ValidationError(
"Found an Attribute element with duplicated ".$keyName,
Expand All @@ -830,7 +830,7 @@ private function _getAttributesByKeyName($keyName = "Name")
}
}

if (in_array($attributeKeyName, array_keys($attributes))) {
if (in_array($attributeKeyName, array_keys($attributes), true)) {
$attributes[$attributeKeyName] = array_merge($attributes[$attributeKeyName], $attributeValues);
} else {
$attributes[$attributeKeyName] = $attributeValues;
Expand Down

0 comments on commit 107757b

Please # to comment.