diff --git a/src/www/system_gateways.php b/src/www/system_gateways.php index a97bea2ff..50a3c9357 100644 --- a/src/www/system_gateways.php +++ b/src/www/system_gateways.php @@ -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