1
0
Fork 0

Merge pull request #7925 from localheinz/fix/empty

Fix: Remove empty node
pull/7934/head
Jordi Boggiano 2019-01-28 16:58:13 +01:00 committed by GitHub
commit f599ebf55b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,10 @@ class JsonConfigSource implements ConfigSourceInterface
{ {
$this->manipulateJson('removeSubNode', $type, $name, function (&$config, $type, $name) { $this->manipulateJson('removeSubNode', $type, $name, function (&$config, $type, $name) {
unset($config[$type][$name]); unset($config[$type][$name]);
if (0 === count($config[$type])) {
unset($config[$type]);
}
}); });
} }