diff options
author | Phil Davis <phil.davis@inf.org> | 2014-11-29 17:30:39 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2014-11-29 17:30:39 +0545 |
commit | 8c2a5a738b2105eba3971baf888fd5a1d8f92960 (patch) | |
tree | 47a0b4063ef5d966e5af7967a75224fecbbbad0c /etc/inc | |
parent | 978b8f508b9b08bdbfe7465ea5bdf4ab6fb9ed7b (diff) | |
download | pfsense-8c2a5a738b2105eba3971baf888fd5a1d8f92960.zip pfsense-8c2a5a738b2105eba3971baf888fd5a1d8f92960.tar.gz |
Fix bracketing of if statement in unbound
Stops message:
Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbound.inc on line 607
The problem was introduced when lines 607-608 were added without adding these brackets.
IMHO programming standards should include ALWAYS using brackets for "if" and other similar statements. That way this sort of code addition accident does not happen. But I guess there are others who have different opinions.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/unbound.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc index a2ecde2..556e772 100644 --- a/etc/inc/unbound.inc +++ b/etc/inc/unbound.inc @@ -602,11 +602,11 @@ function unbound_acls_config() { $aclcfg = "access-control: 127.0.0.1/32 allow\n"; $aclcfg .= "access-control: ::1 allow\n"; // Add our networks for active interfaces including localhost - if (!empty($config['unbound']['active_interface'])) + if (!empty($config['unbound']['active_interface'])) { $active_interfaces = array_flip(explode(",", $config['unbound']['active_interface'])); if (in_array("all", $active_interfaces, true)) $active_interfaces = get_configured_interface_with_descr(); - else + } else $active_interfaces = get_configured_interface_with_descr(); $bindints = ""; |