system: fix iteration warning

This commit is contained in:
Franco Fichtner 2015-07-28 21:14:08 +02:00
parent bf8356c977
commit 042f798d7e

View File

@ -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']);