diff --git a/html/includes/dev-overview-data.inc.php b/html/includes/dev-overview-data.inc.php
index 80a134fb3e..df4f78ba3e 100644
--- a/html/includes/dev-overview-data.inc.php
+++ b/html/includes/dev-overview-data.inc.php
@@ -1,5 +1,8 @@
';
echo "
@@ -32,8 +35,13 @@ echo '
if (!empty($device['ip'])) {
echo "
| Resolved IP | {$device['ip']} |
";
-} elseif ($config['force_ip_to_sysname'] === true && is_ip($device['hostname']) === true) {
- echo "| IP Address | {$device['hostname']} |
";
+} elseif ($config['force_ip_to_sysname'] === true) {
+ try {
+ $ip = IP::parse($device['hostname']);
+ echo "| IP Address | $ip |
";
+ } catch (InvalidIpException $e) {
+ // don't add an ip line
+ }
}
if ($device['hardware']) {