mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-15 08:34:11 +03:00
parent
0527a9def1
commit
d512573af8
@ -31,8 +31,14 @@ function load_system_configs()
|
||||
static $configs = null;
|
||||
|
||||
if (is_null($configs)) {
|
||||
$parser = new YamlParser();
|
||||
$configs = $parser->parse(file_get_contents(MIBEW_FS_ROOT . '/configs/config.yml'));
|
||||
// Make sure that configuration file exists, otherwise initialize empty config
|
||||
if (file_exists(MIBEW_FS_ROOT . '/configs/config.yml')) {
|
||||
$parser = new YamlParser();
|
||||
$configs = $parser->parse(file_get_contents(MIBEW_FS_ROOT . '/configs/config.yml'));
|
||||
}
|
||||
else {
|
||||
$configs = array();
|
||||
}
|
||||
|
||||
// Mailer configs are not necessary and can be omitted but the section
|
||||
// must exist anyway. Empty statement is used to make sure null, false
|
||||
|
Loading…
Reference in New Issue
Block a user