Skip to content

Commit f08bc1e

Browse files
committed
Fix SAML-Toolkits#487. Enable strict check on in_array method
1 parent 9f03ca2 commit f08bc1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Saml2/Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ private function _getAttributesByKeyName($keyName = "Name")
792792

793793
$attributeKeyName = $attributeKeyNode->nodeValue;
794794

795-
if (in_array($attributeKeyName, array_keys($attributes))) {
795+
if (in_array($attributeKeyName, array_keys($attributes), true)) {
796796
if (!$allowRepeatAttributeName) {
797797
throw new OneLogin_Saml2_ValidationError(
798798
"Found an Attribute element with duplicated ".$keyName,
@@ -809,7 +809,7 @@ private function _getAttributesByKeyName($keyName = "Name")
809809
}
810810
}
811811

812-
if (in_array($attributeKeyName, array_keys($attributes))) {
812+
if (in_array($attributeKeyName, array_keys($attributes), true)) {
813813
$attributes[$attributeKeyName] = array_merge($attributes[$attributeKeyName], $attributeValues);
814814
} else {
815815
$attributes[$attributeKeyName] = $attributeValues;

0 commit comments

Comments
 (0)