From a3a0da275065378a883b009624c603e1f7d81152 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 16 Dec 2020 19:44:54 +0000 Subject: [PATCH] Libravatar: Fixes a problem when a DNS request failed --- libravatar/Services/Libravatar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'; }