From dadc99bd9eb0b8633f3f6fcac67f1ae412895c4e Mon Sep 17 00:00:00 2001 From: chadicus Date: Thu, 7 Aug 2025 14:25:38 -0400 Subject: [PATCH] Cast to int before calling imagick method --- src/Image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Image.php b/src/Image.php index 391051c..d39612e 100644 --- a/src/Image.php +++ b/src/Image.php @@ -182,7 +182,7 @@ public static function resize(Imagick $source, int $boxWidth, int $boxHeight, ar //put image in box $canvas = self::getBackgroundCanvas($clone, $color, $blurBackground, $blurValue, $boxWidth, $boxHeight); - if ($canvas->compositeImage($clone, Imagick::COMPOSITE_DEFAULT, $targetX, $targetY) !== true) { + if ($canvas->compositeImage($clone, Imagick::COMPOSITE_DEFAULT, (int)$targetX, (int)$targetY) !== true) { //cumbersome to test throw new \Exception('Imagick::compositeImage() did not return true');//@codeCoverageIgnore }