[icinga-checkins] icinga.org: icingaweb2-module-director/feature/icinga1-config-12919: CustomVariable: Fix getType to output a useable value

git at icinga.org git at icinga.org
Fri Oct 14 12:01:03 CEST 2016


Module: icingaweb2-module-director
Branch: feature/icinga1-config-12919
Commit: 6301aeb47a995cb488b0d7e2f5a3d2a776376061
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=6301aeb47a995cb488b0d7e2f5a3d2a776376061

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Fri Oct 14 11:32:55 2016 +0200

CustomVariable: Fix getType to output a useable value

---

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

diff --git a/library/Director/CustomVariable/CustomVariable.php b/library/Director/CustomVariable/CustomVariable.php
index 4d8d70f..6813d32 100644
--- a/library/Director/CustomVariable/CustomVariable.php
+++ b/library/Director/CustomVariable/CustomVariable.php
@@ -40,8 +40,8 @@ abstract class CustomVariable implements IcingaConfigRenderer
         if ($this->type === null) {
             $parts = explode('\\', get_class($this));
             $class = end($parts);
-            // strlen('CustomVariable') === 9
-            $this->type = substr(end($parts), 9);
+            // strlen('CustomVariable') === 14
+            $this->type = substr($class, 14);
         }
 
         return $this->type;



More information about the icinga-checkins mailing list