diff --git a/CHANGELOG.md b/CHANGELOG.md index b51ff29e5c..d0b1f08f27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ 1. [](#bugfix) * Fixed bug in `ContentBlock` serialization * Fixed `Route::withQueryParam()` to accept array values + * Fixed typo in truncate function [#1943](https://github.com/getgrav/grav/issues/1943) # v1.4.4 ## 05/11/2018 diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index 02d5e158a3..de0fa61576 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -262,7 +262,7 @@ public static function truncate($string, $limit = 150, $up_to_break = false, $br // is $break present between $limit and the end of the string? if ($up_to_break && false !== ($breakpoint = mb_strpos($string, $break, $limit))) { if ($breakpoint < mb_strlen($string) - 1) { - $string = mb_substr($string, 0, $breakpoint) . $break; + $string = mb_substr($string, 0, $breakpoint) . $pad; } } else { $string = mb_substr($string, 0, $limit) . $pad;