From 686fff945e0b4697aa74da404ce90534bb7b121d Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 26 Dec 2024 20:12:34 +0100 Subject: Add async email and topic subscribing --- src/application/mystic/forum/utils/StringUtils.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/application/mystic/forum/utils') diff --git a/src/application/mystic/forum/utils/StringUtils.php b/src/application/mystic/forum/utils/StringUtils.php index fd38915..94221fb 100644 --- a/src/application/mystic/forum/utils/StringUtils.php +++ b/src/application/mystic/forum/utils/StringUtils.php @@ -23,6 +23,8 @@ final class StringUtils { } public static function truncate(string $str, int $maxLength, string $ellipsis = "…"): string { + if ($maxLength < 0) + return $str; return mb_strimwidth($str, 0, $maxLength, $ellipsis); } } -- cgit v1.2.3