From ef7991221bf593ae5adc65fc4fa6a389929473da Mon Sep 17 00:00:00 2001 From: buckaroo-labs <46908086+buckaroo-labs@users.noreply.github.com> Date: Wed, 20 Dec 2023 18:08:41 -0800 Subject: [PATCH] Update functions.php for PHP 8 --- src/SemanticScuttle/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }