fix: ensure proper assignment of default network interface in Proxmox Firewall component by adding checks for network adapter validity

This commit is contained in:
2025-12-01 14:18:36 -05:00
parent 266fb1d004
commit 3b170e88ba

View File

@@ -213,7 +213,7 @@ class Firewall extends Component
}
// Set default interface to first network adapter
if (!empty($this->networkAdapters)) {
if (!empty($this->networkAdapters) && isset($this->networkAdapters[0]) && isset($this->networkAdapters[0]['name'])) {
$this->ruleIface = $this->networkAdapters[0]['name'];
}