diff --git a/modules/metarefresh/hooks/hook_cron.php b/modules/metarefresh/hooks/hook_cron.php index b16364b0e24a776e1af593ab453d704f3cf03c98..ce5b3a0e15c03b3e86fada78e4e5b38b455df9ab 100644 --- a/modules/metarefresh/hooks/hook_cron.php +++ b/modules/metarefresh/hooks/hook_cron.php @@ -13,9 +13,14 @@ function metarefresh_hook_cron(&$croninfo) { try { $config = SimpleSAML_Configuration::getInstance(); - $mconfig = SimpleSAML_Configuration::getConfig('config-metarefresh.php'); + 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; + } - $sets = $mconfig->getConfigList('sets'); + $sets = $mconfig->getConfigList('sets', array()); foreach ($sets AS $setkey => $set) { // Only process sets where cron matches the current cron tag.