Skip to content

Commit c9da6b7

Browse files
committed
Fix integration tests error:
Magento\Framework\Image\Adapter\InterfaceTest::testCreatePngFromString with data set #1 (array(5, 12), array(0, 0, 0), array(0, 20), array(255, 255, 255), 'IMAGEMAGICK') PHPUnit\Framework\Exception: Deprecated: Implicit conversion from float 11.34375 to int loses precision in /var/www/html/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php:505.
1 parent ba1b153 commit c9da6b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public function createPngFromString($text, $font = '')
502502
$draw->annotation(0, $metrics['ascender'], $text);
503503

504504
$height = abs($metrics['ascender']) + abs($metrics['descender']);
505-
$image->newImage($metrics['textWidth'], $height, $background);
505+
$image->newImage($metrics['textWidth'], (int) $height, $background);
506506
$this->_fileType = IMAGETYPE_PNG;
507507
$image->setImageFormat('png');
508508
$image->drawImage($draw);

0 commit comments

Comments
 (0)