Fix error on basket render forillegal ValidateSet

Fixes #83
This commit is contained in:
Lord Hepipud 2020-08-12 10:38:07 +02:00
parent b2ffd317cd
commit cdab7f0b5a

View file

@ -356,6 +356,13 @@ function Add-PowerShellDataList()
);
foreach ($entry in $Arguments) {
if ([string]::IsNullOrEmpty($entry)) {
Write-IcingaConsoleWarning `
-Message 'The plugin argument "{0}" contains the illegal ValidateSet $null which will not be rendered. Please remove it from the arguments list of "{1}"' `
-Objects $Name, $Arguments;
continue;
}
$Basket.DataList[$Name]['entries'] += @{
'entry_name' = $entry;
'entry_value' = $entry;