Skip to content

Commit 9c80e90

Browse files
committed
Save color correctly in background image
1 parent 7ec352a commit 9c80e90

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Catalog/Model/ImageExtractor.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
*/
66
namespace Magento\Catalog\Model;
77

8-
use Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter;
98
use Magento\Catalog\Helper\Image;
9+
use Magento\Catalog\Model\Product\Attribute\Backend\Media\ImageEntryConverter;
10+
use Magento\Framework\View\Xsd\Media\TypeDataExtractorInterface;
1011

11-
class ImageExtractor implements \Magento\Framework\View\Xsd\Media\TypeDataExtractorInterface
12+
class ImageExtractor implements TypeDataExtractorInterface
1213
{
1314
/**
1415
* Extract configuration data of images from the DOM structure
@@ -55,6 +56,7 @@ private function processImageBackground($backgroundString)
5556
$backgroundArray = [];
5657
if (preg_match($pattern, $backgroundString, $backgroundArray)) {
5758
array_shift($backgroundArray);
59+
$backgroundArray = array_map('intval', $backgroundArray);
5860
}
5961
return $backgroundArray;
6062
}

0 commit comments

Comments
 (0)