From e0145ca216bebaab01f726789596228e0d3bb85b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Tue, 17 Jul 2018 01:40:09 +0200 Subject: [PATCH] Fixes E_NOTICE for absent 'port' element (#645) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- mastodoncustomemojis/mastodoncustomemojis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;