From 2d6cf6ed2fd6b55d19c34f70599acd4cd24bb71f Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Tue, 29 Sep 2015 14:53:03 +0000 Subject: [PATCH] Remove unreachable exception: array key is always int or string. --- modules/core/lib/Auth/Process/AttributeAlter.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/core/lib/Auth/Process/AttributeAlter.php b/modules/core/lib/Auth/Process/AttributeAlter.php index 4760c04ba..c9a2acfd7 100644 --- a/modules/core/lib/Auth/Process/AttributeAlter.php +++ b/modules/core/lib/Auth/Process/AttributeAlter.php @@ -57,7 +57,7 @@ class sspmod_core_Auth_Process_AttributeAlter extends SimpleSAML_Auth_Processing // check if this is an option if($value === '%replace') { $this->replace = TRUE; - } elseif ($value == '%remove') { + } elseif ($value === '%remove') { $this->remove = TRUE; } else { throw new SimpleSAML_Error_Exception('Unknown flag : ' . var_export($value, TRUE)); @@ -65,11 +65,6 @@ class sspmod_core_Auth_Process_AttributeAlter extends SimpleSAML_Auth_Processing continue; } - // Unknown flag - if (!is_string($name)) { - throw new SimpleSAML_Error_Exception('Unknown flag : ' . var_export($name, TRUE)); - } - // Set pattern if ($name === 'pattern') { $this->pattern = $value; -- GitLab