mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
interfaces: fix crash report
This commit is contained in:
parent
62a8d031e4
commit
de2b543d11
@ -186,20 +186,20 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
|
||||
unset($config['interfaces'][$id]); /* delete the specified OPTn or LAN*/
|
||||
|
||||
if (is_array($config['dhcpd']) && is_array($config['dhcpd'][$id])) {
|
||||
if (isset($config['dhcpd'][$id])) {
|
||||
unset($config['dhcpd'][$id]);
|
||||
services_dhcpd_configure();
|
||||
}
|
||||
if (count($config['filter']['rule']) > 0) {
|
||||
if (isset($config['filter']['rule'])) {
|
||||
foreach ($config['filter']['rule'] as $x => $rule) {
|
||||
if($rule['interface'] == $id) {
|
||||
if ($rule['interface'] == $id) {
|
||||
unset($config['filter']['rule'][$x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_array($config['nat']['rule']) && count($config['nat']['rule']) > 0) {
|
||||
if (isset($config['nat']['rule'])) {
|
||||
foreach ($config['nat']['rule'] as $x => $rule) {
|
||||
if($rule['interface'] == $id) {
|
||||
if ($rule['interface'] == $id) {
|
||||
unset($config['nat']['rule'][$x]['interface']);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user