Skip to content

Commit

Permalink
Fix Error "round(): Argument #1 ($num) must be of type int|float, str…
Browse files Browse the repository at this point in the history
…ing given"

PlaceholderFilterLoader->load() must not Thumbnail if there is no dimension.
  • Loading branch information
RemyNovactive committed Feb 20, 2024
1 parent 3cead6a commit ad6ec03
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ public function load(ImageInterface $image, array $options = []): ImageInterface
}
}

if ($origWidth > $width || $origHeight > $height) {
$filter = new Thumbnail(new Box($width, $height), ImageInterface::THUMBNAIL_OUTBOUND);
$image = $filter->apply($image);
if ($width && $height) {
if ($origWidth > $width || $origHeight > $height) {
$filter = new Thumbnail(new Box($width, $height), ImageInterface::THUMBNAIL_OUTBOUND);
$image = $filter->apply($image);
}
}

$image->strip();
Expand Down

0 comments on commit ad6ec03

Please sign in to comment.