check if term is set before processing it

This commit is contained in:
Mario
2024-03-08 09:23:31 +00:00
parent deba1863f5
commit 043e2ff58b

View File

@@ -2882,7 +2882,7 @@ class Activity {
}
}
if (!PConfig::Get($channel['channel_id'], 'system', 'no_smilies')) {
if (isset($item['term']) && !PConfig::Get($channel['channel_id'], 'system', 'no_smilies')) {
foreach ($item['term'] as $t) {
if ($t['ttype'] === TERM_EMOJI) {
$item['body'] = str_replace($t['term'], '[img class="smiley emoji custom-emoji" alt="' . $t['term'] . '" title="' . $t['term'] . '"]' . $t['url'] . '[/img]', $item['body']);