Commit 042f798d authored by Franco Fichtner's avatar Franco Fichtner

system: fix iteration warning

parent bf8356c9
......@@ -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']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment