From c5bbc5a1fa59a066b24da37b5b3f17ce655fda1c Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 9 Nov 2017 10:10:26 +0100 Subject: [PATCH] HealthCommand: compare overall numeric state... ...not the object itself --- application/clicommands/HealthCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/clicommands/HealthCommand.php b/application/clicommands/HealthCommand.php index 7be24ea9..ea28191d 100644 --- a/application/clicommands/HealthCommand.php +++ b/application/clicommands/HealthCommand.php @@ -50,7 +50,7 @@ class HealthCommand extends Command $output[] = $check->getOutput(); } - if ($state === 0) { + if ($state->getNumeric() === 0) { echo "Icinga Director: everything is fine\n\n"; } else { echo "Icinga Director: there are problems\n\n";