Update functions.php

This commit is contained in:
buckaroo-labs 2023-12-20 18:12:12 -08:00 committed by GitHub
parent ef7991221b
commit fabb46f79a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,7 +168,7 @@ function shortenString($string, $maxSize=75) {
$output = '';
if(strlen($string) > $maxSize) {
//2023-12-20 add ROUND() function to avoid 'Deprecated' warning
$output = substr($string, 0, $maxSize/2).'...'.substr($string, -round($maxSize/2));
$output = substr($string, 0, $maxSize/2).'...'.substr($string, -round((float)$maxSize/2));
} else {
$output = $string;
}