Fixed var names for framework.

This commit is contained in:
Dmitry Khomutov 2018-01-18 21:51:33 +07:00
commit dd1d7e2be3
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
25 changed files with 196 additions and 98 deletions

View file

@ -52,7 +52,7 @@ class Config
{
// Path to a YAML file.
$parser = new YamlParser();
$yaml = file_get_contents($yamlFile);
$yaml = file_get_contents($yamlFile);
$config = (array)$parser->parse($yaml);
if (empty($config)) {
@ -75,7 +75,7 @@ class Config
$keyParts = explode('.', $key);
$selected = $this->config;
$i = -1;
$i = -1;
$last_part = count($keyParts) - 1;
while ($part = array_shift($keyParts)) {
$i++;
@ -180,6 +180,7 @@ class Config
$source = $target;
return;
}
foreach ($target as $target_key => $target_value) {
if (isset($source[$target_key])) {
if (!is_array($source[$target_key]) && !is_array($target_value)) {