From: Hypolite Petovan Date: Fri, 12 Oct 2018 12:53:43 +0000 (-0400) Subject: [mastodoncustomemojis] Ensure enoji array keys are set X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=39bb3ed6eb09ecce2e5e42b7807c582595f1774b;p=friendica-addons.git [mastodoncustomemojis] Ensure enoji array keys are set --- diff --git a/mastodoncustomemojis/mastodoncustomemojis.php b/mastodoncustomemojis/mastodoncustomemojis.php index 1acd924a..ad890817 100644 --- a/mastodoncustomemojis/mastodoncustomemojis.php +++ b/mastodoncustomemojis/mastodoncustomemojis.php @@ -96,8 +96,10 @@ function mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url) if (is_array($emojis_array) && count($emojis_array)) { foreach ($emojis_array as $emoji) { - $return['texts'][] = ':' . $emoji['shortcode'] . ':'; - $return['icons'][] = ':' . $emoji['shortcode'] . ':'; + if (!empty($emoji['shortcode']) && !empty($emoji['static_url'])) { + $return['texts'][] = ':' . $emoji['shortcode'] . ':'; + $return['icons'][] = ':' . $emoji['shortcode'] . ':'; + } } } }