Skip to content

Commit

Permalink
Fix PHP deprecated Implicit conversion from float to int loses precision
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Nov 17, 2023
1 parent 2d8841d commit 1d15404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/Resources/includes/Resources.fnc.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function ResourcesMakeLink( $value, $name )
$separator = '/.../';
$separator_length = mb_strlen( $separator );
$max_length = 100 - $separator_length;
$start = $max_length / 2;
$start = (int) ( $max_length / 2 );
$trunc = mb_strlen( $truncated_link ) - $max_length;
$truncated_link = substr_replace( $truncated_link, $separator, $start, $trunc );
}
Expand Down

0 comments on commit 1d15404

Please sign in to comment.