summaryrefslogtreecommitdiff
path: root/src/application/mystic/forum/utils
diff options
context:
space:
mode:
authorJonas Kohl2024-12-26 20:12:34 +0100
committerJonas Kohl2024-12-26 20:12:34 +0100
commit686fff945e0b4697aa74da404ce90534bb7b121d (patch)
treecb5582c8d118cb480f2978fa821950f4a2259401 /src/application/mystic/forum/utils
parent11fed2c8ce3dd38fe686e7b27db738f64373fe3d (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.php2
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);
}
}