Commit 41479a3d authored by Franco Fichtner's avatar Franco Fichtner

console: fix access test of gateways array

parent 1a9e8c96
...@@ -196,7 +196,7 @@ function next_unused_gateway_name($interface) ...@@ -196,7 +196,7 @@ function next_unused_gateway_name($interface)
global $g, $config; global $g, $config;
$new_name = "GW_" . strtoupper($interface); $new_name = "GW_" . strtoupper($interface);
if (!is_array($config['gateways']['gateway_item'])) { if (!isset($config['gateways']['gateway_item'])) {
return $new_name; return $new_name;
} }
$count = 1; $count = 1;
...@@ -219,7 +219,8 @@ function next_unused_gateway_name($interface) ...@@ -219,7 +219,8 @@ function next_unused_gateway_name($interface)
function add_gateway_to_config($interface, $gatewayip, $inet_type) function add_gateway_to_config($interface, $gatewayip, $inet_type)
{ {
global $g, $config, $dry_run; global $g, $config, $dry_run;
if (!is_array($config['gateways']['gateway_item'])) {
if (!isset($config['gateways']['gateway_item'])) {
$config['gateways']['gateway_item'] = array(); $config['gateways']['gateway_item'] = array();
} }
$a_gateways = &$config['gateways']['gateway_item']; $a_gateways = &$config['gateways']['gateway_item'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment