diff --git a/modules/metarefresh/hooks/hook_cron.php b/modules/metarefresh/hooks/hook_cron.php index ce5b3a0e15c03b3e86fada78e4e5b38b455df9ab..f4a791c83c33bb1e0b77237fc9bfb5ca3d48f4bb 100644 --- a/modules/metarefresh/hooks/hook_cron.php +++ b/modules/metarefresh/hooks/hook_cron.php @@ -13,12 +13,7 @@ function metarefresh_hook_cron(&$croninfo) { try { $config = SimpleSAML_Configuration::getInstance(); - try { - $mconfig = SimpleSAML_Configuration::getConfig('config-metarefresh.php'); - } catch (Exception $e) { - SimpleSAML_Logger::info('cron [metarefresh]: Could not open configuration file for module - skipping.'); - return; - } + $mconfig = SimpleSAML_Configuration::getOptionalConfig('config-metarefresh.php'); $sets = $mconfig->getConfigList('sets', array()); diff --git a/modules/metarefresh/www/fetch.php b/modules/metarefresh/www/fetch.php index 246bf74afe9069c92508d53d4a80eb014e927946..20b6aec868f8d87ab7c44ee08fb8218ac793b501 100644 --- a/modules/metarefresh/www/fetch.php +++ b/modules/metarefresh/www/fetch.php @@ -1,14 +1,14 @@ <?php $config = SimpleSAML_Configuration::getInstance(); -$mconfig = SimpleSAML_Configuration::getConfig('config-metarefresh.php'); +$mconfig = SimpleSAML_Configuration::getOptionalConfig('config-metarefresh.php'); SimpleSAML_Utilities::requireAdmin(); SimpleSAML_Logger::setCaptureLog(TRUE); -$sets = $mconfig->getConfigList('sets'); +$sets = $mconfig->getConfigList('sets', array()); foreach ($sets AS $setkey => $set) {