Fix PHP warning

This commit is contained in:
Laura Hausmann 2021-09-03 03:42:00 +02:00
parent cc2d0ea6f9
commit 7d4992480b
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -15,7 +15,8 @@ function gethost($ip)
$ires = array();
$host = `host -s -W 5 $ip`;
$host = ($host ? end( explode(' ', trim(trim($host), '.'))) : $ip);
$host = explode(' ', trim(trim($host), '.'));
$host = ($host ? end($host) : $ip);
$ires = array();
if(in_array($host, Array('reached', 'record', '3(NXDOMAIN)')))
{