mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 18:04:26 +02:00
Fix error in libravatar addon
This commit is contained in:
parent
c56ec7c7c4
commit
2667b4d78e
1 changed files with 3 additions and 3 deletions
|
@ -361,19 +361,19 @@ class Services_Libravatar
|
||||||
protected function domainGet($identifier)
|
protected function domainGet($identifier)
|
||||||
{
|
{
|
||||||
if ($identifier === null) {
|
if ($identifier === null) {
|
||||||
return null;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// What are we, email or openid? Split ourself up and get the
|
// What are we, email or openid? Split ourself up and get the
|
||||||
// important bit out.
|
// important bit out.
|
||||||
if (filter_var($identifier, FILTER_VALIDATE_EMAIL)) {
|
if (filter_var($identifier, FILTER_VALIDATE_EMAIL)) {
|
||||||
$email = explode('@', $identifier);
|
$email = explode('@', $identifier);
|
||||||
return $email[1];
|
return (string) $email[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
//OpenID
|
//OpenID
|
||||||
$url = parse_url($identifier);
|
$url = parse_url($identifier);
|
||||||
$domain = $url['host'];
|
$domain = (string) $url['host'];
|
||||||
if (isset($url['port']) && $url['scheme'] === 'http'
|
if (isset($url['port']) && $url['scheme'] === 'http'
|
||||||
&& $url['port'] != 80
|
&& $url['port'] != 80
|
||||||
|| isset($url['port']) && $url['scheme'] === 'https'
|
|| isset($url['port']) && $url['scheme'] === 'https'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue