diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc index d11079f99..1c6b01878 100644 --- a/src/etc/inc/gwlb.inc +++ b/src/etc/inc/gwlb.inc @@ -445,7 +445,7 @@ function return_gateways_array($disabled = false, $localhost = false, $inactive $i = -1; /* Process/add all the configured gateways. */ - if (is_array($config['gateways']['gateway_item'])) { + if (isset($config['gateways']['gateway_item'])) { foreach ($config['gateways']['gateway_item'] as $gateway) { /* Increment it here to do not skip items */ $i++; @@ -796,7 +796,7 @@ function return_gateway_groups_array() { fixup_default_gateway("inet", $gateways_status, $gateways_arr); fixup_default_gateway("inet6", $gateways_status, $gateways_arr); } - if (is_array($config['gateways']['gateway_group'])) { + if (isset($config['gateways']['gateway_group'])) { $carplist = get_configured_carp_interface_list(); foreach ($config['gateways']['gateway_group'] as $group) { /* create array with group gateways members separated by tier */ diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index f91e14c98..0e9555c9b 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -185,7 +185,7 @@ function interface_netgraph_needed($interface = "wan") { } if ($found == false) { $realif = get_real_interface($interface); - if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { + if (isset($config['ppps']['ppp'])) { foreach ($config['ppps']['ppp'] as $pppid => $ppp) { /* This if block doesn't do anything. It can be deleted. diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index 1e48f26b3..3ba927bec 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -387,7 +387,7 @@ function system_routing_configure($interface = '') $interfacegwv6 = ""; $foundgwv6 = false; /* tack on all the hard defined gateways as well */ - if (is_array($config['gateways']['gateway_item'])) { + if (isset($config['gateways']['gateway_item'])) { array_map('unlink', glob('/tmp/*_defaultgw{,v6}', GLOB_BRACE)); foreach ($config['gateways']['gateway_item'] as $gateway) { if (isset($gateway['defaultgw'])) {