mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
GetHostByAddr: Handle Null
This commit is contained in:
parent
213f897ffc
commit
ce9f94feda
@ -29,7 +29,10 @@ class PropertyModifierGetHostByAddr extends PropertyModifierHook
|
|||||||
|
|
||||||
public function transform($value)
|
public function transform($value)
|
||||||
{
|
{
|
||||||
$host = gethostbyaddr($value);
|
if ($value === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
$host = gethostbyaddr($value);
|
||||||
if ($host === false) {
|
if ($host === false) {
|
||||||
switch ($this->getSetting('on_failure')) {
|
switch ($this->getSetting('on_failure')) {
|
||||||
case 'null':
|
case 'null':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user