diff --git a/src/www/system_gateways.php b/src/www/system_gateways.php index 2935254e7..09d49e48f 100644 --- a/src/www/system_gateways.php +++ b/src/www/system_gateways.php @@ -77,7 +77,7 @@ function can_delete_gateway_item($id) return false; } - if (is_array($config['gateways']['gateway_group'])) { + if (isset($config['gateways']['gateway_group'])) { foreach ($config['gateways']['gateway_group'] as $group) { foreach ($group['item'] as $item) { $items = explode("|", $item); @@ -89,7 +89,7 @@ function can_delete_gateway_item($id) } } - if (is_array($config['staticroutes']['route'])) { + if (isset($config['staticroutes']['route'])) { foreach ($config['staticroutes']['route'] as $route) { if ($route['gateway'] == $a_gateways[$id]['name']) { $input_errors[] = sprintf(gettext("Gateway '%s' cannot be deleted because it is in use on Static Route '%s'"), $a_gateways[$id]['name'], $route['network']);