mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
src: fix a few `Illegal string offset' warnings
This commit is contained in:
parent
b0dac38305
commit
14b3fa5c70
@ -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 */
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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'])) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user