aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-06 14:50:29 -0800
committerfriendica <info@friendica.com>2015-01-06 14:50:29 -0800
commit4b9ed48a54313f931e000bf649b890aa34429780 (patch)
treea042e3ee11ee88cf3c5a4a4b3826b21f5dcdbc4e /include/network.php
parent2417125c89aa8325707a4b2e6b52dea0f0f21f4d (diff)
downloadvolse-hubzilla-4b9ed48a54313f931e000bf649b890aa34429780.tar.gz
volse-hubzilla-4b9ed48a54313f931e000bf649b890aa34429780.tar.bz2
volse-hubzilla-4b9ed48a54313f931e000bf649b890aa34429780.zip
don't let dns_get_record() "write to screen" if it errors.
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/network.php b/include/network.php
index 98c411cd8..170b77d7d 100644
--- a/include/network.php
+++ b/include/network.php
@@ -384,7 +384,7 @@ function validate_url(&$url) {
$url = 'http://' . $url;
$h = @parse_url($url);
- if(($h) && (dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR) || filter_var($h['host'], FILTER_VALIDATE_IP) )) {
+ if(($h) && (@dns_get_record($h['host'], DNS_A + DNS_CNAME + DNS_PTR) || filter_var($h['host'], FILTER_VALIDATE_IP) )) {
return true;
}
return false;
@@ -402,7 +402,7 @@ function validate_email($addr) {
return false;
$h = substr($addr,strpos($addr,'@') + 1);
- if(($h) && (dns_get_record($h, DNS_A + DNS_CNAME + DNS_PTR + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) {
+ if(($h) && (@dns_get_record($h, DNS_A + DNS_CNAME + DNS_PTR + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) {
return true;
}
return false;