Merge pull request #12380 from annando/parts

Fix "part" calculation for split posts
This commit is contained in:
Hypolite Petovan 2022-12-10 17:20:06 -05:00 committed by GitHub
commit 0a296c3f02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,7 +303,7 @@ class Plaintext
$limit += mb_strlen(trim($word)) - self::URL_LENGTH; $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); $parts[] = trim($part);
$part = ''; $part = '';
$limit = $baselimit; $limit = $baselimit;