mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
system: fix iteration warning
This commit is contained in:
parent
bf8356c977
commit
042f798d7e
@ -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']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user