From: Roland Häder Date: Mon, 16 Jul 2018 23:40:09 +0000 (+0200) Subject: Fixes E_NOTICE for absent 'port' element (#645) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e0145ca216bebaab01f726789596228e0d3bb85b;p=friendica-addons.git Fixes E_NOTICE for absent 'port' element (#645) Signed-off-by: Roland Häder --- diff --git a/mastodoncustomemojis/mastodoncustomemojis.php b/mastodoncustomemojis/mastodoncustomemojis.php index d7ce7426..ad712acb 100644 --- a/mastodoncustomemojis/mastodoncustomemojis.php +++ b/mastodoncustomemojis/mastodoncustomemojis.php @@ -62,7 +62,7 @@ function mastodoncustomemojis_get_custom_emojis_for_author($author_link) $url_parts = parse_url($author_link); - $api_base_url = $url_parts['scheme'] . '://' . $url_parts['host'] . ($url_parts['port'] ? ':' . $url_parts['port'] : ''); + $api_base_url = $url_parts['scheme'] . '://' . $url_parts['host'] . (isset($url_parts['port']) ? ':' . $url_parts['port'] : ''); $cache_key = 'mastodoncustomemojis:' . $api_base_url;