Commit 9e57943f authored by Franco Fichtner's avatar Franco Fichtner

console: fix a crash report

(cherry picked from commit 2aca9405)
parent 928a0c0b
......@@ -459,7 +459,7 @@ function vlan_setup($iflist, $fp)
$yes_no_prompt = '[y|n]? ';
if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
if (isset($config['vlans']['vlan'])) {
echo <<<EOD
......@@ -468,9 +468,10 @@ WARNING: all existing VLANs will be cleared if you proceed!
Do you want to proceed ${yes_no_prompt}
EOD;
if (strcasecmp(chop(fgets($fp)), "y") != 0)
if (strcasecmp(chop(fgets($fp)), "y") != 0) {
return;
}
}
$config['vlans']['vlan'] = array();
echo "\n";
......
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