Skip to content

Commit 45db076

Browse files
authored
PHP 8 Fatal error: Uncaught ValueError: imagecolorsforindex() in Varien_Image_Adapter_Gd2 (#2197)
1 parent 02bd670 commit 45db076

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Varien/Image/Adapter/Gd2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private function _fillBackgroundColor(&$imageResourceTo)
268268
// fill image with indexed non-alpha transparency
269269
elseif (false !== $transparentIndex) {
270270
$transparentColor = false;
271-
if ($transparentIndex >=0 && $transparentIndex <= imagecolorstotal($this->_imageHandler)) {
271+
if ($transparentIndex >=0 && $transparentIndex < imagecolorstotal($this->_imageHandler)) {
272272
list($r, $g, $b) = array_values(imagecolorsforindex($this->_imageHandler, $transparentIndex));
273273
$transparentColor = imagecolorallocate($imageResourceTo, $r, $g, $b);
274274
}

0 commit comments

Comments
 (0)