summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_dns.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-07-30 22:08:42 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-07-30 22:08:42 -0400
commit7a87cb97e5d1270ca7cb214e1e958da229ba70c4 (patch)
treef4a796d5b7b58da6252fb2ea97b8b5e3e04b0f5c /usr/local/www/diag_dns.php
parent705c72eada89799fb1ae76daf7ad7f05742fe30b (diff)
downloadpfsense-7a87cb97e5d1270ca7cb214e1e958da229ba70c4.zip
pfsense-7a87cb97e5d1270ca7cb214e1e958da229ba70c4.tar.gz
Do not create blank entries
Diffstat (limited to 'usr/local/www/diag_dns.php')
-rw-r--r--usr/local/www/diag_dns.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php
index 715cb0b..4f70d56 100644
--- a/usr/local/www/diag_dns.php
+++ b/usr/local/www/diag_dns.php
@@ -51,10 +51,12 @@ if($_GET['createalias'] == "true") {
$resolved = split("\n", $dig);
$isfirst = true;
foreach($resolved as $re) {
- if(!$isfirst)
- $addresses .= " ";
- $addresses .= $re . "/32";
- $isfirst = false;
+ if($re <> "") {
+ if(!$isfirst)
+ $addresses .= " ";
+ $addresses .= $re . "/32";
+ $isfirst = false;
+ }
}
$newalias = array();
$aliasname = str_replace(array(".","-"), "_", $host);
OpenPOWER on IntegriCloud