Bugfix config loading from phar

This commit is contained in:
Chris 2024-03-11 23:30:25 +01:00
parent 4150dfcf5b
commit c810876aa4

View File

@ -23,7 +23,12 @@ class Configuration
{ {
$config = new Configuration(); $config = new Configuration();
$yaml = Yaml::parseFile($file); $file = realpath($file);
if (!file_exists($file)) {
throw new \Exception("Configuration file not found");
}
$data = file_get_contents($file);
$yaml = Yaml::parse($data);
if (isset($yaml['security'])) { if (isset($yaml['security'])) {
$security = $yaml['security']; $security = $yaml['security'];