Skip to content

Commit 1b4e310

Browse files
schloramhelhum
authored andcommitted
[BUGFIX] Only extend YAML file content if config is not empty
Relates #36
1 parent 7618b10 commit 1b4e310

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ConfigDumper.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ public function dumpToFile(array $config, string $file, string $comment = ''): b
4949
$fileContent .= Yaml::dump(['processors' => $config['processors']], 2) . chr(10);
5050
unset($config['processors']);
5151
}
52-
$fileContent .= Yaml::dump($config, 6);
52+
53+
if (!empty($config)) {
54+
$fileContent .= Yaml::dump($config, 6);
55+
}
56+
5357
break;
5458
case 'php':
5559
default:

0 commit comments

Comments
 (0)