From 107757b29402ec5b2525c3e37d58e3ed8ac56f6e Mon Sep 17 00:00:00 2001 From: Sixto Martin Date: Mon, 6 Sep 2021 17:34:59 +0200 Subject: [PATCH] Fix #487. Enable strict check on in_array method --- src/Saml2/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Saml2/Response.php b/src/Saml2/Response.php index a2f8d6dd..b60e25b3 100644 --- a/src/Saml2/Response.php +++ b/src/Saml2/Response.php @@ -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, @@ -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;