Skip to content

Commit

Permalink
Merge pull request #1154 from ibrainventures/patch-1
Browse files Browse the repository at this point in the history
[fix] php8.1 Implicit conversion from float Size.php PixelateCommand
  • Loading branch information
olivervogel committed May 21, 2022
2 parents c0a578c + dcd370e commit 04be355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function execute($image)
$width = $image->getWidth();
$height = $image->getHeight();

$image->getCore()->scaleImage(max(1, ($width / $size)), max(1, ($height / $size)));
$image->getCore()->scaleImage(max(1, intval($width / $size)), max(1, intval($height / $size)));
$image->getCore()->scaleImage($width, $height);

return true;
Expand Down
4 changes: 2 additions & 2 deletions src/Intervention/Image/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function setPivot(Point $point)
*/
public function getWidth()
{
return $this->width;
return intval($this->width);
}

/**
Expand All @@ -81,7 +81,7 @@ public function getWidth()
*/
public function getHeight()
{
return $this->height;
return intval($this->height);
}

/**
Expand Down

0 comments on commit 04be355

Please sign in to comment.