diff options
author | Jonas Kohl | 2024-12-26 20:12:34 +0100 |
---|---|---|
committer | Jonas Kohl | 2024-12-26 20:12:34 +0100 |
commit | 686fff945e0b4697aa74da404ce90534bb7b121d (patch) | |
tree | cb5582c8d118cb480f2978fa821950f4a2259401 /src/application/mystic/forum/utils | |
parent | 11fed2c8ce3dd38fe686e7b27db738f64373fe3d (diff) |
Add async email and topic subscribingv0.7.2
Diffstat (limited to 'src/application/mystic/forum/utils')
-rw-r--r-- | src/application/mystic/forum/utils/StringUtils.php | 2 |
1 files changed, 2 insertions, 0 deletions
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); } } |