mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
Gateways, minor overview cleanup. if all gateway_items are removed, we should remove the container to to prevent leaving an empty item. found while working on https://github.com/opnsense/core/issues/3625
This commit is contained in:
parent
74ff64787c
commit
bb6833d501
@ -105,6 +105,10 @@ function delete_gateway_item($id, $a_gateways)
|
||||
}
|
||||
}
|
||||
unset($config['gateways']['gateway_item'][$a_gateways[$id]['attribute']]);
|
||||
if (empty($config['gateways']['gateway_item'])) {
|
||||
// make sure we don't leave a stray gateway_item
|
||||
unset($config['gateways']['gateway_item']);
|
||||
}
|
||||
}
|
||||
|
||||
// fetch gateway list including active default for IPv4/IPv6
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user