From 6cea734a595ed01038adb9cc440fb2bcb49be3e2 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Thu, 23 Sep 2021 17:24:59 +0200 Subject: [PATCH] Don't access `soft_state` property directly --- library/Icingadb/Model/HostState.php | 4 ++-- library/Icingadb/Model/ServiceState.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/Icingadb/Model/HostState.php b/library/Icingadb/Model/HostState.php index 69e63bb1..11e25533 100644 --- a/library/Icingadb/Model/HostState.php +++ b/library/Icingadb/Model/HostState.php @@ -73,7 +73,7 @@ class HostState extends State */ public function getStateText() { - return HostStates::text($this->properties['soft_state']); + return HostStates::text($this->soft_state); } /** @@ -83,6 +83,6 @@ class HostState extends State */ public function getStateTextTranslated() { - return HostStates::text($this->properties['soft_state']); + return HostStates::text($this->soft_state); } } diff --git a/library/Icingadb/Model/ServiceState.php b/library/Icingadb/Model/ServiceState.php index 9a95bc61..0124fa82 100644 --- a/library/Icingadb/Model/ServiceState.php +++ b/library/Icingadb/Model/ServiceState.php @@ -70,7 +70,7 @@ class ServiceState extends State */ public function getStateText() { - return ServiceStates::text($this->properties['soft_state']); + return ServiceStates::text($this->soft_state); } /** @@ -80,6 +80,6 @@ class ServiceState extends State */ public function getStateTextTranslated() { - return ServiceStates::text($this->properties['soft_state']); + return ServiceStates::text($this->soft_state); } }