FEATURE: Allow empty feature yaml files

* Handle empty yaml files for features in options class.
This commit is contained in:
Daniel Siepmann 2017-04-27 11:48:59 +02:00
parent f972533e04
commit fad2a4e498
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -140,10 +140,11 @@ class Options
);
foreach ($fileNames as $file) {
$option = array_merge(
$option,
Yaml::parse(file_get_contents((string) $file))
);
$content = Yaml::parse(file_get_contents((string) $file));
if ($content === null) {
$content = [];
}
$option = array_merge($option, $content);
}
return $option;