Browse Source

Libravatar: Fixes a problem when a DNS request failed

pull/1058/head
Michael 6 months ago
parent
commit
a3a0da2750
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libravatar/Services/Libravatar.php

+ 2
- 2
libravatar/Services/Libravatar.php 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';
}


Loading…
Cancel
Save