mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-02 19:59:31 -05:00
Fixes invalid threshold comparison in case either warning or critical threshold is empty
This commit is contained in:
parent
b886269bbf
commit
4a40a001e8
1 changed files with 5 additions and 0 deletions
|
|
@ -1075,6 +1075,11 @@ function New-IcingaCheck()
|
|||
return;
|
||||
}
|
||||
|
||||
# Just in case one of the thresholds is not set, we cannot validate anything
|
||||
if ([string]::IsNullOrEmpty($this.__WarningValue.Threshold.Threshold) -or [string]::IsNullOrEmpty($this.__CriticalValue.Threshold.Threshold)) {
|
||||
return;
|
||||
}
|
||||
|
||||
[bool]$OutOfRange = $FALSE;
|
||||
|
||||
# Both thresholds use the mode
|
||||
|
|
|
|||
Loading…
Reference in a new issue