loadConfig returns config that was actually applied

This commit is contained in:
Adrien Crivelli 2022-09-15 19:07:28 +02:00
parent 54415c113b
commit 301e481fbe
No known key found for this signature in database
GPG Key ID: 16D79B903B4B5874
1 changed files with 4 additions and 2 deletions

View File

@ -424,19 +424,21 @@ class Settings
if ($configFile !== null) {
$config = @parse_ini_file($configFile);
if ($config === false) {
return $config;
return array();
}
}
// Set config value
$appliedConfig = array();
foreach ($config as $key => $value) {
$method = "set{$key}";
if (method_exists(__CLASS__, $method)) {
self::$method($value);
$appliedConfig[$key] = $value;
}
}
return $config;
return $appliedConfig;
}
/**