more minot php8 warning fixes

This commit is contained in:
Chris
2023-10-15 20:30:12 +02:00
parent a1bc5b5fa5
commit cea501d854

View File

@@ -91,14 +91,14 @@ function rotate(&$im,$direction)
if ($height > $width) if ($height > $width)
{ {
$ratio = $maxheight / $height; $ratio = $maxheight / $height;
$newheight = $maxheight; $newheight = intval($maxheight);
$newwidth = $width * $ratio; $newwidth = intval($width * $ratio) ;
} }
else else
{ {
$ratio = $maxwidth / $width; $ratio = $maxwidth / $width;
$newwidth = $maxwidth; $newwidth = intval($maxwidth) ;
$newheight = $height * $ratio; $newheight = intval($height * $ratio);
} }
$newimg = imagecreatetruecolor($newwidth,$newheight); $newimg = imagecreatetruecolor($newwidth,$newheight);