]> git.mxchange.org Git - friendica-addons.git/commitdiff
Fix errors in libravatar addon
authorArt4 <art4@wlabs.de>
Sat, 30 Nov 2024 19:41:11 +0000 (19:41 +0000)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 12 Dec 2024 21:37:42 +0000 (22:37 +0100)
libravatar/Services/Libravatar.php

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