diff --git a/includes/common.php b/includes/common.php index fc56d60f0f..4747f54856 100644 --- a/includes/common.php +++ b/includes/common.php @@ -1601,12 +1601,14 @@ function load_all_os($existing = false, $cached = true) } foreach ($os_list as $file) { - $tmp = Symfony\Component\Yaml\Yaml::parse(file_get_contents($file)); + if (is_readable($file)) { + $tmp = Symfony\Component\Yaml\Yaml::parse(file_get_contents($file)); - if (isset($config['os'][$tmp['os']])) { - $config['os'][$tmp['os']] = array_replace_recursive($tmp, $config['os'][$tmp['os']]); - } else { - $config['os'][$tmp['os']] = $tmp; + if (isset($config['os'][$tmp['os']])) { + $config['os'][$tmp['os']] = array_replace_recursive($tmp, $config['os'][$tmp['os']]); + } else { + $config['os'][$tmp['os']] = $tmp; + } } } }