From ef7991221bf593ae5adc65fc4fa6a389929473da Mon Sep 17 00:00:00 2001 From: buckaroo-labs Date: Wed, 20 Dec 2023 18:08:41 -0800 Subject: Update functions.php for PHP 8 --- src/SemanticScuttle/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/SemanticScuttle/functions.php b/src/SemanticScuttle/functions.php index 802a7f1..9bd5553 100644 --- a/src/SemanticScuttle/functions.php +++ b/src/SemanticScuttle/functions.php @@ -167,7 +167,8 @@ function createVoteURL($for, $bId) function shortenString($string, $maxSize=75) { $output = ''; if(strlen($string) > $maxSize) { - $output = substr($string, 0, $maxSize/2).'...'.substr($string, -$maxSize/2); + //2023-12-20 add ROUND() function to avoid 'Deprecated' warning + $output = substr($string, 0, $maxSize/2).'...'.substr($string, -round($maxSize/2)); } else { $output = $string; } -- cgit v1.2.3-54-g00ecf