Skip to content

Commit

Permalink
more minot php8 warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Oct 15, 2023
1 parent a1bc5b5 commit cea501d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content-controllers/image/resize.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ function resize(&$img,$size)
if ($height > $width)
{
$ratio = $maxheight / $height;
$newheight = $maxheight;
$newwidth = $width * $ratio;
$newheight = intval($maxheight);
$newwidth = intval($width * $ratio) ;
}
else
{
$ratio = $maxwidth / $width;
$newwidth = $maxwidth;
$newheight = $height * $ratio;
$newwidth = intval($maxwidth) ;
$newheight = intval($height * $ratio);
}

$newimg = imagecreatetruecolor($newwidth,$newheight);
Expand Down

0 comments on commit cea501d

Please sign in to comment.