Update functions.php

This commit is contained in:
buckaroo-labs 2023-12-20 18:14:22 -08:00 committed by GitHub
parent fabb46f79a
commit 60fd8f4098
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 = ''; $output = '';
if(strlen($string) > $maxSize) { if(strlen($string) > $maxSize) {
//2023-12-20 add ROUND() function to avoid 'Deprecated' warning //2023-12-20 add ROUND() function to avoid 'Deprecated' warning
$output = substr($string, 0, $maxSize/2).'...'.substr($string, -round((float)$maxSize/2)); $output = substr($string, 0, round($maxSize/2)).'...'.substr($string, -round((float)$maxSize/2));
} else { } else {
$output = $string; $output = $string;
} }