From 042f798d7e1d01020e07b428e0abcbb399b85349 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 28 Jul 2015 21:14:08 +0200 Subject: [PATCH] system: fix iteration warning --- src/www/system_gateways.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']);