diff --git a/src/etc/inc/unbound.inc b/src/etc/inc/unbound.inc index d8fdb234c..828675579 100644 --- a/src/etc/inc/unbound.inc +++ b/src/etc/inc/unbound.inc @@ -162,11 +162,11 @@ EOF; $active_interfaces = explode(",", $config['unbound']['active_interface']); foreach($active_interfaces as $ubif) { $intip = get_interface_ip($ubif); - if (!is_null($intip)) { + if (!empty($intip)) { $bindints .= "interface: $intip\n"; } $intip = get_interface_ipv6($ubif); - if (!is_null($intip)) { + if (!empty($intip)) { $bindints .= "interface: $intip\n"; } } @@ -182,11 +182,11 @@ EOF; $outgoing_interfaces = explode(",", $config['unbound']['outgoing_interface']); foreach($outgoing_interfaces as $outif) { $outip = get_interface_ip($outif); - if (!is_null($outip)) { + if (!empty($outip)) { $outgoingints .= "outgoing-interface: $outip\n"; } $outip = get_interface_ipv6($outif); - if (!is_null($outip)) { + if (!empty($outip)) { $outgoingints .= "outgoing-interface: $outip\n"; } } @@ -687,13 +687,13 @@ function unbound_acls_config() { $bindints = ""; foreach($active_interfaces as $ubif => $ifdesc) { $ifip = get_interface_ip($ubif); - if (!is_null($ifip)) { + if (!empty($ifip)) { $subnet_bits = get_interface_subnet($ubif); $subnet_ip = gen_subnet($ifip, $subnet_bits); $aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n"; } $ifip = get_interface_ipv6($ubif); - if (!is_null($ifip)) { + if (!empty($ifip)) { $subnet_bits = get_interface_subnetv6($ubif); $subnet_ip = gen_subnetv6($ifip, $subnet_bits); $aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n";