From: Michael Date: Sat, 10 Dec 2022 21:23:21 +0000 (+0000) Subject: Fix "part" calculation for splitted posts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=539ac4f2b82e661d63b17c5276550ba6120806fe;p=friendica.git Fix "part" calculation for splitted posts --- diff --git a/src/Content/Text/Plaintext.php b/src/Content/Text/Plaintext.php index ef2337faf4..af8e9c00fe 100644 --- a/src/Content/Text/Plaintext.php +++ b/src/Content/Text/Plaintext.php @@ -303,7 +303,7 @@ class Plaintext $limit += mb_strlen(trim($word)) - self::URL_LENGTH; } - if ((mb_strlen($part . $word) > $limit - 8) && (mb_strlen($part . $word . $message) > $limit)) { + if ((mb_strlen($part . $word) > $limit - 8) && ($parts || (mb_strlen($part . $word . $message) > $limit))) { $parts[] = trim($part); $part = ''; $limit = $baselimit;