mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2026-05-28 04:35:53 -04:00
GetHostByAddr: Handle Null
This commit is contained in:
parent
213f897ffc
commit
ce9f94feda
1 changed files with 4 additions and 1 deletions
|
|
@ -29,7 +29,10 @@ class PropertyModifierGetHostByAddr extends PropertyModifierHook
|
|||
|
||||
public function transform($value)
|
||||
{
|
||||
$host = gethostbyaddr($value);
|
||||
if ($value === null) {
|
||||
return null;
|
||||
}
|
||||
$host = gethostbyaddr($value);
|
||||
if ($host === false) {
|
||||
switch ($this->getSetting('on_failure')) {
|
||||
case 'null':
|
||||
|
|
|
|||
Loading…
Reference in a new issue