diff options
author | Jaime Perez Crespo <jaime.perez@uninett.no> | 2015-08-30 21:33:28 +0200 |
---|---|---|
committer | Jaime Perez Crespo <jaime.perez@uninett.no> | 2015-08-30 21:33:28 +0200 |
commit | 4e649e055ccb051e74ddfbf7bc439b5a3c457c76 (patch) | |
tree | cdefe61be99fcea0c7a1824bbacaaa586d45ee69 /lib | |
parent | cfa28c4a77c3a8f6165f379a78823c848f1e5315 (diff) | |
download | simplesamlphp-4e649e055ccb051e74ddfbf7bc439b5a3c457c76.zip simplesamlphp-4e649e055ccb051e74ddfbf7bc439b5a3c457c76.tar.gz simplesamlphp-4e649e055ccb051e74ddfbf7bc439b5a3c457c76.tar.bz2 |
Throw an exception instead of doing nothing if the auth source specified is invalid. This mimics the old behaviour.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/SimpleSAML/Auth/Default.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php index 5dfa1b8..76b7f39 100644 --- a/lib/SimpleSAML/Auth/Default.php +++ b/lib/SimpleSAML/Auth/Default.php @@ -21,9 +21,10 @@ class SimpleSAML_Auth_Default { array $params = array()) { $as = SimpleSAML_Auth_Source::getById($authId); - if ($as !== null) { - $as->initLogin($return, $errorURL, $params); + if ($as === null) { + throw new Exception('Invalid authentication source: ' . $authId); } + $as->initLogin($return, $errorURL, $params); } |