From 111df607bce5acc9fcf6c9b54daa86b4d67cb742 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 6 Mar 2024 12:01:25 -0500 Subject: [PATCH] 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 --- src/Model/Post/Counts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/Post/Counts.php b/src/Model/Post/Counts.php index 1b04636447..66d6bddad3 100644 --- a/src/Model/Post/Counts.php +++ b/src/Model/Post/Counts.php @@ -43,7 +43,7 @@ class Counts Activity::EMOJIREACT, Activity::ANNOUNCE, Activity::VIEW, Activity::READ])) { return true; } - + $condition = ['thr-parent-id' => $uri_id, 'vid' => $vid, 'deleted' => false]; if ($body == $verb) { @@ -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 = '';