1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-16 01:54:28 +02:00

Flextype fallback settings implementation

- use array_replace_recursive() instead of array_merge
This commit is contained in:
Awilum
2018-12-19 19:48:34 +03:00
parent 6c50d0feae
commit a9e192d6b1

View File

@@ -152,14 +152,13 @@ class Flextype
$site_settings = YamlParser::decode(Filesystem::getFileContent($site_settings_file_path));
// Merge settings
$settings = array_merge($default_settings, $site_settings);
$settings = array_replace_recursive($default_settings, $site_settings);
// Set settings
Registry::set('settings', $settings);
} else {
throw new \RuntimeException("Flextype settings and Site settings config files does not exist.");
}
}
/**