Skip to content

Commit 16d2677

Browse files
committed
Fixes array handling for checks
1 parent e21011f commit 16d2677

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/icinga/plugin/New-IcingaCheckPackage.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function New-IcingaCheckPackage()
6767
$check.__SetCheckOutput();
6868
$check.__SetVerbosity($this.__GetVerbosity());
6969
$check.__SetParent($this);
70-
$this.__Checks += $check;
70+
[array]$this.__Checks += $check;
7171
}
7272
}
7373

@@ -172,7 +172,7 @@ function New-IcingaCheckPackage()
172172
return;
173173
}
174174

175-
$this.__Checks = $this.__Checks | Sort-Object -Property Name;
175+
[array]$this.__Checks = ($this.__Checks | Sort-Object -Property Name);
176176

177177
# Loop all checks to understand the content of result
178178
foreach ($check in $this.__Checks) {

0 commit comments

Comments
 (0)