Fix PHP errors

This commit is contained in:
bergware
2025-02-13 23:30:54 +01:00
parent 83dc36ff61
commit 3a46ac1e38
@@ -28,8 +28,8 @@ function port($eth) {
}
exec("grep -Po 'nameserver \K\S+' /etc/resolv.conf 2>/dev/null",$ns);
$eth = $_POST['port'];
$vlan = $_POST['vlan'];
$eth = $_POST['port'] ?? '';
$vlan = $_POST['vlan'] ?? '';
$port = port($eth).($vlan ? ".$vlan" : "");
$v6on = trim(file_get_contents("/proc/sys/net/ipv6/conf/$port/disable_ipv6"))==='0';
$none = _('None');