mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-05-28 04:35:53 -04:00
CustomVariable: Fix getType to output a useable value
This commit is contained in:
parent
1e70cface0
commit
7916e0c0c6
1 changed files with 3 additions and 2 deletions
|
|
@ -40,8 +40,9 @@ abstract class CustomVariable implements IcingaConfigRenderer
|
|||
{
|
||||
if ($this->type === null) {
|
||||
$parts = explode('\\', get_class($this));
|
||||
// strlen('CustomVariable') === 9
|
||||
$this->type = substr(end($parts), 9);
|
||||
$class = end($parts);
|
||||
// strlen('CustomVariable') === 14
|
||||
$this->type = substr($class, 14);
|
||||
}
|
||||
|
||||
return $this->type;
|
||||
|
|
|
|||
Loading…
Reference in a new issue