diff options
-rw-r--r-- | etc/inc/pfsense-utils.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 7d93811..15ba42b 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1472,7 +1472,8 @@ function add_hostname_to_watch($hostname) { } } file_put_contents("/var/db/dnscache/$hostname", $contents); - $result = explode("\n", $contents); + /* Remove empty elements */ + $result = array_filter(explode("\n", $contents), 'strlen'); } return $result; } |