summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML/Module.php
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2015-05-26 13:51:38 +0200
committerOlav Morken <olav.morken@uninett.no>2015-05-26 13:51:38 +0200
commit0fc3f8a7a80ddebbd0c6f84085b9492764ede65f (patch)
tree0f03d8ac0763923c0ce6d48dc43726710eb0dd19 /lib/SimpleSAML/Module.php
parent33ceceaa796f609f7a8f047982e1f558c9129471 (diff)
downloadsimplesamlphp-0fc3f8a7a80ddebbd0c6f84085b9492764ede65f.zip
simplesamlphp-0fc3f8a7a80ddebbd0c6f84085b9492764ede65f.tar.gz
simplesamlphp-0fc3f8a7a80ddebbd0c6f84085b9492764ede65f.tar.bz2
Ensure that config.php is optional for module loading.
Currently, if we try to load a class from a module, and the config.php is absent, we will get an error about the missing configuration file. There is no reason for the configuration file to be mandatory here, since we have reasonable fallbacks, so fix the code to make it optional. This should make it easier to write tests for code in modules.
Diffstat (limited to 'lib/SimpleSAML/Module.php')
-rw-r--r--lib/SimpleSAML/Module.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SimpleSAML/Module.php b/lib/SimpleSAML/Module.php
index 45b1ae6..0620d60 100644
--- a/lib/SimpleSAML/Module.php
+++ b/lib/SimpleSAML/Module.php
@@ -41,7 +41,7 @@ class SimpleSAML_Module {
return FALSE;
}
- $globalConfig = SimpleSAML_Configuration::getInstance();
+ $globalConfig = SimpleSAML_Configuration::getOptionalConfig();
$moduleEnable = $globalConfig->getArray('module.enable', array());
if(isset($moduleEnable[$module])) {