Skip to content
Snippets Groups Projects
Commit b36fbaf5 authored by Olav Morken's avatar Olav Morken
Browse files

saml: Fix NULL return from saml_IdP_SAML2::getAssociationConfig().

This function should not return NULL, but did so due to a missing
return statement. This patch adds that return statement, and fixes
the documentation for the function.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3206 44740490-163a-0410-bde0-09ae8108e29a
parent 7dda96e6
No related branches found
No related tags found
No related merge requests found
...@@ -551,14 +551,14 @@ class sspmod_saml_IdP_SAML2 { ...@@ -551,14 +551,14 @@ class sspmod_saml_IdP_SAML2 {
* *
* @param SimpleSAML_IdP $idp The IdP the association belongs to. * @param SimpleSAML_IdP $idp The IdP the association belongs to.
* @param array $association The SP association. * @param array $association The SP association.
* @return SimpleSAML_Configuration|NULL Configuration object for the SP metadata. * @return SimpleSAML_Configuration Configuration object for the SP metadata.
*/ */
public static function getAssociationConfig(SimpleSAML_IdP $idp, array $association) { public static function getAssociationConfig(SimpleSAML_IdP $idp, array $association) {
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
try { try {
return $metadata->getMetaDataConfig($association['saml:entityID'], 'saml20-sp-remote'); return $metadata->getMetaDataConfig($association['saml:entityID'], 'saml20-sp-remote');
} catch (Exception $e) { } catch (Exception $e) {
SimpleSAML_Configuration::loadFromArray(array(), 'Unknown SAML 2 entity.'); return SimpleSAML_Configuration::loadFromArray(array(), 'Unknown SAML 2 entity.');
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment