This commit is contained in:
James Cole
2021-01-07 20:31:48 +01:00
parent b040db7976
commit 24b7543f72
2 changed files with 10 additions and 2 deletions

View File

@@ -57,7 +57,7 @@ if (!function_exists('limitStringLength')) {
$length = \strlen($string);
$result = $string;
if ($length > $maxChars) {
$result = substr_replace($string, ' ... ', $maxChars / 2, $length - $maxChars);
$result = substr_replace($string, ' ... ', (int)($maxChars / 2), $length - $maxChars);
}
return $result;