Resolve php warnings w/ null coalescing operator

This commit is contained in:
billz 2024-12-16 17:54:17 -08:00
parent 5020e8b5a0
commit 26bd632bab

View File

@ -52,8 +52,8 @@ function DisplayDHCPConfig()
$conf = ParseConfig($return);
exec('cat '. RASPI_DNSMASQ_PREFIX.$ap_iface.'.conf', $return);
$conf = array_merge(ParseConfig($return));
$hosts = (array)$conf['dhcp-host'];
$upstreamServers = (array)$conf['server'];
$hosts = (array)($conf['dhcp-host'] ?? []);
$upstreamServers = (array)($conf['server'] ?? []);
exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces);
exec('cat ' . RASPI_DNSMASQ_LEASES, $leases);