Skip to content

Commit

Permalink
Fixes type error when getting post previews for message index
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed Jul 19, 2024
1 parent 1a7d5fb commit 862ff94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Actions/MessageIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public static function buildTopicContext(array $row): void
$row['first_body'] = strip_tags(strtr(BBCodeParser::load()->parse($row['first_body'], (bool) $row['first_smileys'], (int) $row['id_first_msg']), ['<br>' => '&#10;']));

if (Utils::entityStrlen($row['first_body']) > Config::$modSettings['preview_characters']) {
$row['first_body'] = Utils::entitySubstr($row['first_body'], 0, Config::$modSettings['preview_characters']) . '...';
$row['first_body'] = Utils::entitySubstr($row['first_body'], 0, (int) Config::$modSettings['preview_characters']) . '...';
}

// Censor the subject and message preview.
Expand All @@ -262,7 +262,7 @@ public static function buildTopicContext(array $row): void
$row['last_body'] = strip_tags(strtr(BBCodeParser::load()->parse($row['last_body'], (bool) $row['last_smileys'], (int) $row['id_last_msg']), ['<br>' => '&#10;']));

if (Utils::entityStrlen($row['last_body']) > Config::$modSettings['preview_characters']) {
$row['last_body'] = Utils::entitySubstr($row['last_body'], 0, Config::$modSettings['preview_characters']) . '...';
$row['last_body'] = Utils::entitySubstr($row['last_body'], 0, (int) Config::$modSettings['preview_characters']) . '...';
}

Lang::censorText($row['last_subject']);
Expand Down

0 comments on commit 862ff94

Please sign in to comment.