Don't call mb_strlen() on $body if it isn't set in Model\Post\Counts

- Address https://github.com/friendica/friendica/issues/13761#issuecomment-1978354153
This commit is contained in:
Hypolite Petovan 2024-03-06 12:01:25 -05:00
parent b8b76e870d
commit 111df607bc

View file

@ -52,7 +52,7 @@ class Counts
} elseif ($verb == Activity::POST) {
$condition['gravity'] = Item::GRAVITY_COMMENT;
$body = '';
} elseif (($verb != Activity::POST) && (mb_strlen($body) == 1) && Smilies::isEmojiPost($body)) {
} elseif ($body && mb_strlen($body) == 1 && Smilies::isEmojiPost($body)) {
$condition['body'] = $body;
} else {
$body = '';