kea: only emit value if found for consistency

This commit is contained in:
Franco Fichtner 2024-05-17 11:59:27 +02:00
parent b2e31eb56f
commit e07789eebb

View File

@ -69,8 +69,8 @@ function kea_staticmap($proto = null, $valid_addresses = true, $domain_fallback
continue;
}
$hostname = (string)$reservation->hostname;
$description = (string)$reservation->description;
$hostname = !empty((string)$reservation->hostname) ? (string)$reservation->hostname : null;
$description = !empty((string)$reservation->description) ? (string)$reservation->description : null;
$subnet_node = $keav4->getNodeByReference("subnets.subnet4.{$reservation->subnet}");
$domain = $domain_fallback;