diff options
author | Olav Morken <olav.morken@uninett.no> | 2010-07-08 13:18:33 +0000 |
---|---|---|
committer | Olav Morken <olav.morken@uninett.no> | 2010-07-08 13:18:33 +0000 |
commit | 4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20 (patch) | |
tree | 4d39a271866225107c02f6265d7afc743b8abcd2 /lib/SimpleSAML | |
parent | 25dcd1dc86cbefe78c41e61e9a15428a282bc080 (diff) | |
download | simplesamlphp-4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20.zip simplesamlphp-4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20.tar.gz simplesamlphp-4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20.tar.bz2 |
Utilities::getAuthority: Fix misleading error message.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2387 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r-- | lib/SimpleSAML/Utilities.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index ef31974..3657a5f 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -2152,8 +2152,14 @@ class SimpleSAML_Utilities { if (isset($candidates[$idpmetadata['auth']])) { return $candidates[$idpmetadata['auth']]; } - throw new SimpleSAML_Error_Exception('You need to set \'authority\' in the metadata for ' . - var_export($idpmetadata['entityid'], TRUE) . '.'); + if (strpos($idpmetadata['auth'], '/') !== FALSE) { + /* Probably a file. */ + throw new SimpleSAML_Error_Exception('You need to set \'authority\' in the metadata for ' . + var_export($idpmetadata['entityid'], TRUE) . '.'); + } else { + throw new SimpleSAML_Error_Exception('Unknown authsource ' . + var_export($idpmetadata['auth'], TRUE) . '.'); + } } |