Skip to content

Commit 23489e8

Browse files
authored
Merge pull request #32 from chadicus/master
Cast to int before calling imagick method
2 parents 632ab54 + dadc99b commit 23489e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public static function resize(Imagick $source, int $boxWidth, int $boxHeight, ar
182182

183183
//put image in box
184184
$canvas = self::getBackgroundCanvas($clone, $color, $blurBackground, $blurValue, $boxWidth, $boxHeight);
185-
if ($canvas->compositeImage($clone, Imagick::COMPOSITE_DEFAULT, $targetX, $targetY) !== true) {
185+
if ($canvas->compositeImage($clone, Imagick::COMPOSITE_DEFAULT, (int)$targetX, (int)$targetY) !== true) {
186186
//cumbersome to test
187187
throw new \Exception('Imagick::compositeImage() did not return true');//@codeCoverageIgnore
188188
}

0 commit comments

Comments
 (0)