Update functions.php for PHP 8
This commit is contained in:
parent
6e5f4f3757
commit
ef7991221b
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue