GetHostByAddr: Handle Null
This commit is contained in:
parent
213f897ffc
commit
ce9f94feda
|
@ -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 New Issue