diff --git a/docs/simplesamlphp-customauth.md b/docs/simplesamlphp-customauth.md index 8f0c2c04217a4f4b916b643c387257735c0b6f8c..8238ba695b3dfbfafd23a356e6420ed3084cd43a 100644 --- a/docs/simplesamlphp-customauth.md +++ b/docs/simplesamlphp-customauth.md @@ -273,9 +273,11 @@ The class follows: throw new Exception('Missing or invalid password option in config.'); } $this->password = $config['password']; - $this->options = $config['options']; - if (!is_array($config['options])) { - throw new Exception('Missing or invalid options option in config.'); + if (isset($config['options']) { + if (!is_array($config['options])) { + throw new Exception('Missing or invalid options option in config.'); + } + $this->options = $config['options']; } } diff --git a/modules/consent/lib/Consent/Store/Database.php b/modules/consent/lib/Consent/Store/Database.php index ff5993dad4c0b33325c87d237a4a02259fb9b4b1..0a99bfdbacd9a76bbda58a3f7594d0c88a3885cf 100644 --- a/modules/consent/lib/Consent/Store/Database.php +++ b/modules/consent/lib/Consent/Store/Database.php @@ -485,7 +485,7 @@ class sspmod_consent_Consent_Store_Database extends sspmod_consent_Store $driver_options[PDO::ATTR_TIMEOUT] = $this->_timeout; } if (isset($this->_options)) { - array_merge($driver_options, $this->_options); + $this->_options = array_merge($driver_options, $this->_options); } else { $this->_options = $driver_options; } diff --git a/modules/sqlauth/lib/Auth/Source/SQL.php b/modules/sqlauth/lib/Auth/Source/SQL.php index 7f46942115d82128db65e6f1a220d46aff96ca8e..f1c6c773eb4884117a83b91cad63aad90e4c08dd 100644 --- a/modules/sqlauth/lib/Auth/Source/SQL.php +++ b/modules/sqlauth/lib/Auth/Source/SQL.php @@ -74,8 +74,10 @@ class sspmod_sqlauth_Auth_Source_SQL extends sspmod_core_Auth_UserPassBase { $this->dsn = $config['dsn']; $this->username = $config['username']; $this->password = $config['password']; - $this->options = $config['options']; $this->query = $config['query']; + if (isset($config['options'])) { + $this->options = $config['options']; + } }