Skip to content

Commit

Permalink
fix: Stop flattening config options added in config.php (#5491)
Browse files Browse the repository at this point in the history
  • Loading branch information
geordish authored and Rosiak committed Jan 17, 2017
1 parent 0a5bedb commit 977a7b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/common.php
Expand Up @@ -1523,9 +1523,10 @@ function load_os(&$device)
throw new Exception('No OS to load');
}

$config['os'][$device['os']] = Symfony\Component\Yaml\Yaml::parse(
$tmp_os = Symfony\Component\Yaml\Yaml::parse(
file_get_contents($config['install_dir'] . '/includes/definitions/' . $device['os'] . '.yaml')
);
$config['os'][$device['os']] = array_replace_recursive($tmp_os, $config['os'][$device['os']]);

// Set type to a predefined type for the OS if it's not already set
if ($config['os'][$device['os']]['type'] != $device['type']) {
Expand Down Expand Up @@ -1555,7 +1556,7 @@ function load_all_os($restricted = array())
$tmp = Symfony\Component\Yaml\Yaml::parse(
file_get_contents($file)
);
$config['os'][$tmp['os']] = $tmp;
$config['os'][$tmp['os']] = array_replace_recursive($tmp, $config['os'][$tmp['os']]);
}
}

Expand Down

0 comments on commit 977a7b6

Please sign in to comment.