]> git.mxchange.org Git - friendica-addons.git/commitdiff
Fix error in libravatar addon
authorArt4 <art4@wlabs.de>
Thu, 13 Mar 2025 11:38:18 +0000 (11:38 +0000)
committerArt4 <art4@wlabs.de>
Thu, 13 Mar 2025 11:38:18 +0000 (11:38 +0000)
libravatar/Services/Libravatar.php

index e51ef0700b17559b839d02ab57f80136f9fd5157..a5bd0793c6919dbc8ed7160164ef1ec97f005580 100644 (file)
@@ -361,19 +361,19 @@ class Services_Libravatar
     protected function domainGet($identifier)
     {
         if ($identifier === null) {
-            return null;
+            return '';
         }
 
         // What are we, email or openid? Split ourself up and get the
         // important bit out.
         if (filter_var($identifier, FILTER_VALIDATE_EMAIL)) {
             $email = explode('@', $identifier);
-            return $email[1];
+            return (string) $email[1];
         }
 
         //OpenID
         $url    = parse_url($identifier);
-        $domain = $url['host'];
+        $domain = (string) $url['host'];
         if (isset($url['port']) && $url['scheme'] === 'http'
             && $url['port'] != 80
             || isset($url['port']) && $url['scheme'] === 'https'