mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
console: fix access test of gateways array
This commit is contained in:
parent
1a9e8c9694
commit
41479a3dfb
@ -196,7 +196,7 @@ function next_unused_gateway_name($interface)
|
||||
global $g, $config;
|
||||
$new_name = "GW_" . strtoupper($interface);
|
||||
|
||||
if (!is_array($config['gateways']['gateway_item'])) {
|
||||
if (!isset($config['gateways']['gateway_item'])) {
|
||||
return $new_name;
|
||||
}
|
||||
$count = 1;
|
||||
@ -219,7 +219,8 @@ function next_unused_gateway_name($interface)
|
||||
function add_gateway_to_config($interface, $gatewayip, $inet_type)
|
||||
{
|
||||
global $g, $config, $dry_run;
|
||||
if (!is_array($config['gateways']['gateway_item'])) {
|
||||
|
||||
if (!isset($config['gateways']['gateway_item'])) {
|
||||
$config['gateways']['gateway_item'] = array();
|
||||
}
|
||||
$a_gateways = &$config['gateways']['gateway_item'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user