diff options
author | Zoltan Flamis <zoltan@innocraft.com> | 2021-03-05 00:59:31 +0300 |
---|---|---|
committer | Zoltan Flamis <zoltan@innocraft.com> | 2021-03-05 00:59:31 +0300 |
commit | 0c402b7531b4ea0220ee08af38194e476f95a855 (patch) | |
tree | bdc63094ae18d0a0696c2105a58b49138756efad | |
parent | b972facc0fe0610f1989378375768c8539ca7c72 (diff) |
don not truncate only one character
-rw-r--r-- | core/Twig.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Twig.php b/core/Twig.php index c31aae480f..83bde2275e 100644 --- a/core/Twig.php +++ b/core/Twig.php @@ -619,7 +619,7 @@ class Twig $shortenWords = []; foreach ($words as $word) { - $shortenWords[] = strlen($word) > $limit ? substr($word, 0, $limit) . $append : $word; + $shortenWords[] = strlen($word) > $limit + 1 ? substr($word, 0, $limit) . $append : $word; } return implode(' ', $shortenWords); |