From: Michael Date: Wed, 16 Dec 2020 19:44:54 +0000 (+0000) Subject: Libravatar: Fixes a problem when a DNS request failed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a3a0da275065378a883b009624c603e1f7d81152;p=friendica-addons.git Libravatar: Fixes a problem when a DNS request failed --- diff --git a/libravatar/Services/Libravatar.php b/libravatar/Services/Libravatar.php index f182a996..c679ca9d 100644 --- a/libravatar/Services/Libravatar.php +++ b/libravatar/Services/Libravatar.php @@ -413,10 +413,10 @@ class Services_Libravatar // Lets try get us some records based on the choice of subdomain // and the domain we had passed in. - $srv = dns_get_record($subdomain . $domain, DNS_SRV); + $srv = @dns_get_record($subdomain . $domain, DNS_SRV); // Did we get anything? No? - if (count($srv) == 0) { + if (empty($srv)) { // Then let's try Libravatar.org. return $fallback . 'libravatar.org'; }