monitoring/detail: Don't fail if a macro does not exist on the host or service
This commit is contained in:
parent
f73e6d9225
commit
c9c5762320
|
@ -55,10 +55,10 @@ class Macro
|
|||
*/
|
||||
public static function resolveMacro($macro, $object)
|
||||
{
|
||||
if (array_key_exists($macro, self::$icingaMacros) && $object->{self::$icingaMacros[$macro]} !== false) {
|
||||
if (isset(self::$icingaMacros[$macro]) && isset($object->{self::$icingaMacros[$macro]})) {
|
||||
return $object->{self::$icingaMacros[$macro]};
|
||||
}
|
||||
if (array_key_exists($macro, $object->customvars)) {
|
||||
if (isset($object->customvars[$macro])) {
|
||||
return $object->customvars[$macro];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue