From 7a732de5f409477ba8ebb5c41b17b8b539fdce32 Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Wed, 25 Mar 2020 22:12:17 +0100 Subject: [PATCH] Fixes debug messages being written while no debug option was defined --- lib/core/logging/Write-IcingaDebugMessage.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/logging/Write-IcingaDebugMessage.psm1 b/lib/core/logging/Write-IcingaDebugMessage.psm1 index 4ba204f..187765c 100644 --- a/lib/core/logging/Write-IcingaDebugMessage.psm1 +++ b/lib/core/logging/Write-IcingaDebugMessage.psm1 @@ -8,7 +8,7 @@ function Write-IcingaDebugMessage() return; } - if ($global:IcingaDaemonData.DebugMode -eq $FALSE) { + if ($null -eq $global:IcingaDaemonData -Or $global:IcingaDaemonData.DebugMode -eq $FALSE) { return; }