Skip to content

Commit

Permalink
setaddr.php: improve type checks. closes #3939
Browse files Browse the repository at this point in the history
(cherry picked from commit 1f17762)
(cherry picked from commit 6db615b)
  • Loading branch information
AdSchellevis authored and fichtner committed Feb 20, 2020
1 parent f9006d0 commit 2702445
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/opnsense/scripts/shell/setaddr.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,12 @@ function console_configure_dhcpd($version = 4)
}
}

if (!$config['interfaces']['lan']) {
if (empty($config['interfaces']['lan'])) {
unset($config['interfaces']['lan']);
if ($config['dhcpd']['lan']) {
if (isset($config['dhcpd']['lan'])) {
unset($config['dhcpd']['lan']);
}
if ($config['dhcpdv6']['lan']) {
if (isset($config['dhcpdv6']['lan'])) {
unset($config['dhcpdv6']['lan']);
}
unset($config['nat']);
Expand Down

0 comments on commit 2702445

Please sign in to comment.