do not bork when config file is absent

This commit is contained in:
<bdauvergne@entrouvert.com> 1207327452 +0200 0001-01-01 00:00:00 +00:00
parent 69511a0c54
commit 13de6a0438
1 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,11 @@ class LassoSPKitConfig {
/* Where is lasso PHP binding ? */
self::$default_values['lasso_lib'] = ini_get('extension_dir').'/lasso.php';
self::$file = lassospkit_datadir() . '/lassospkit_config.ini';
self::$instance = self::loadIni(self::$file);
if (file_exists(self::$file)) {
self::$instance = self::loadIni(self::$file);
} else {
self::$instance = array();
}
}
}
/** Commit the content of the singleton table to the .ini file */