[icinga-checkins] icinga.org: icingaweb2-module-director/feature-ddo-playground: StateObject : fix ctype_digit check

git at icinga.org git at icinga.org
Tue Jul 19 10:31:52 CEST 2016


Module: icingaweb2-module-director
Branch: feature-ddo-playground
Commit: 7c76c343333452f324901261e7b7aede95c1c2c5
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=7c76c343333452f324901261e7b7aede95c1c2c5

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Jun 21 16:05:11 2016 +0200

StateObject: fix ctype_digit check

---

 library/Director/Ddo/StateObject.php |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/library/Director/Ddo/StateObject.php b/library/Director/Ddo/StateObject.php
index b048648..caf7edc 100644
--- a/library/Director/Ddo/StateObject.php
+++ b/library/Director/Ddo/StateObject.php
@@ -70,8 +70,8 @@ abstract class StateObject extends DdoObject
 
     public function setState_type($type)
     {
-        if (ctype_digit($type)) {
-            $type = $this->stateTypes[$type];
+        if (ctype_digit((string) $type)) {
+            $type = self::$stateTypes[(int) $type];
         }
 
         return $this->reallySet('state_type', $type);



More information about the icinga-checkins mailing list