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 9f03ca2 commit f08bc1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Saml2/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ private function _getAttributesByKeyName($keyName = "Name")

$attributeKeyName = $attributeKeyNode->nodeValue;

if (in_array($attributeKeyName, array_keys($attributes))) {
if (in_array($attributeKeyName, array_keys($attributes), true)) {
if (!$allowRepeatAttributeName) {
throw new OneLogin_Saml2_ValidationError(
"Found an Attribute element with duplicated ".$keyName,
Expand All @@ -809,7 +809,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 f08bc1e

Please sign in to comment.