Merge pull request #1058 from annando/notice

Libravatar: Fixes a problem when a DNS request failed
This commit is contained in:
Hypolite Petovan 2020-12-16 14:54:08 -05:00 committed by GitHub
commit 16588c41f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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';
}