Fix errors in libravatar addon

pull/1579/head
Art4 2024-11-30 19:41:11 +00:00
parent ace19814d7
commit e86d15993b
1 changed files with 2 additions and 2 deletions

View File

@ -401,9 +401,8 @@ class Services_Libravatar
*/ */
protected function srvGet($domain, $https = false) protected function srvGet($domain, $https = false)
{ {
// Are we going secure? Set up a fallback too. // Are we going secure? Set up a fallback too.
if (isset($https) && $https === true) { if ($https === true) {
$subdomain = '_avatars-sec._tcp.'; $subdomain = '_avatars-sec._tcp.';
$fallback = 'seccdn.'; $fallback = 'seccdn.';
} else { } else {
@ -426,6 +425,7 @@ class Services_Libravatar
$top = $srv[0]; $top = $srv[0];
$sum = 0; $sum = 0;
$pri = [];
// Try to adhere to RFC2782's weighting algorithm, page 3 // Try to adhere to RFC2782's weighting algorithm, page 3
// "arrange all SRV RRs (that have not been ordered yet) in any order, // "arrange all SRV RRs (that have not been ordered yet) in any order,