Merge pull request #1806 from Icinga/bugfix/render-empty-strings

ConfigHelper: Ensure empty vars are not written as void to config
This commit is contained in:
Markus Frosch 2019-03-21 13:54:24 +01:00 committed by GitHub
commit 70dfc9dae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -406,6 +406,10 @@ class IcingaConfigHelper
$parts[] = static::renderString(substr($string, $offset, $i - $offset));
}
return implode(' + ', $parts);
if (! empty($parts)) {
return implode(' + ', $parts);
} else {
return '""';
}
}
}