diff options
author | MaZderMind | 2016-12-11 20:01:33 +0100 |
---|---|---|
committer | MaZderMind | 2016-12-11 20:37:54 +0100 |
commit | 738878b8b060b3cfcdde2d88a1a28d5ce83e4aa7 (patch) | |
tree | c661d7f1a73b1c4e6640389898a8bac32023fb16 /model | |
parent | a38a7fcc85c99fa8bd17dd591a5dcad07577c306 (diff) |
better handling for legacy config errors
Diffstat (limited to '')
-rw-r--r-- | model/Conferences.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/model/Conferences.php b/model/Conferences.php index 77069ad..2dc9f35 100644 --- a/model/Conferences.php +++ b/model/Conferences.php @@ -73,8 +73,14 @@ class Conferences } public static function loadConferenceConfig($mandator) { - $config = forceslash(Conferences::MANDATOR_DIR).forceslash($mandator).'config.php'; - return include($config); + $configfile = forceslash(Conferences::MANDATOR_DIR).forceslash($mandator).'config.php'; + $config = include($configfile); + + if(!is_array($config)) { + throw new ConfigException("Loading $configfile did not return an array. Maybe it's missing a return-statement?"); + } + + return $config; } public static function getConference($mandator) { |