Skip to content

Commit

Permalink
fix(progressBar): fix others deprecated implicit conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
acheype committed Nov 7, 2023
1 parent e338927 commit 4fcbb0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/progressBar/libs/progressBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
$noir = imagecolorallocate($image, 0, 0, 0);
$blanc = imagecolorallocate($image, 255, 255, 255);
if ($percent < 50) {
$color = imagecolorallocate($image, 255, 255 * $percent / 50, 0);
$color = imagecolorallocate($image, 255, intval(255 * $percent / 50), 0);
} else {
$color = imagecolorallocate($image, 255 * (100 - $percent) / 50, 255, 0);
$color = imagecolorallocate($image, intval(255 * (100 - $percent) / 50), 255, 0);
}

imagefilledrectangle($image, 0, 0, $width-1, $height-1, $noir);
Expand Down

0 comments on commit 4fcbb0c

Please sign in to comment.