GetHostByAddr: Handle Null

This commit is contained in:
Nathaniel Donahue 2020-10-28 08:27:56 +01:00 committed by Thomas Gelf
parent 213f897ffc
commit ce9f94feda
1 changed files with 4 additions and 1 deletions

View File

@ -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':