diff options
author | buckaroo-labs | 2023-12-20 18:08:41 -0800 |
---|---|---|
committer | GitHub | 2023-12-20 18:08:41 -0800 |
commit | ef7991221bf593ae5adc65fc4fa6a389929473da (patch) | |
tree | cb0bd72bc5b5fd392178ca508456afb8054887de /src/SemanticScuttle/functions.php | |
parent | 6e5f4f375758ee71ab950b0fa03dcaaef75c4616 (diff) | |
download | scuttle-ef7991221bf593ae5adc65fc4fa6a389929473da.tar.gz scuttle-ef7991221bf593ae5adc65fc4fa6a389929473da.zip |
Update functions.php for PHP 8
Diffstat (limited to 'src/SemanticScuttle/functions.php')
-rw-r--r-- | src/SemanticScuttle/functions.php | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |