From d90d3061aabe2a7fc2bf32185f93032b4bf79498 Mon Sep 17 00:00:00 2001 From: "jaimepc@gmail.com" Date: Mon, 3 Feb 2014 14:11:01 +0000 Subject: [PATCH] AttributeAlter: stop gracefully when no such attribute is found. git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@3352 44740490-163a-0410-bde0-09ae8108e29a --- modules/core/lib/Auth/Process/AttributeAlter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/lib/Auth/Process/AttributeAlter.php b/modules/core/lib/Auth/Process/AttributeAlter.php index 66cb4696..9e97de6d 100644 --- a/modules/core/lib/Auth/Process/AttributeAlter.php +++ b/modules/core/lib/Auth/Process/AttributeAlter.php @@ -135,9 +135,9 @@ class sspmod_core_Auth_Process_AttributeAlter extends SimpleSAML_Auth_Processing throw new SimpleSAML_Error_Exception("Cannot use '%remove' when 'target' is different than 'subject'."); } - // ensure the subject exists if (!array_key_exists($this->subject, $attributes)) { - throw new SimpleSAML_Error_Exception("Can't find " . $this->subject . " in user's attributes."); + // if no such subject, stop gracefully + return; } if ($this->replace) { // replace the whole value