Index: branches/5.2.x/core/units/helpers/image_helper.php =================================================================== diff -u -N -r14699 -r14752 --- branches/5.2.x/core/units/helpers/image_helper.php (.../image_helper.php) (revision 14699) +++ branches/5.2.x/core/units/helpers/image_helper.php (.../image_helper.php) (revision 14752) @@ -1,6 +1,6 @@ = 0) { + if ( $transparent_index >= 0 && $transparent_index < imagecolorstotal($src_image_rs) ) { // get the original image's transparent color's RGB values $transparent_color = imagecolorsforindex($src_image_rs, $transparent_index); @@ -260,7 +260,7 @@ } // always make a transparent background color for PNGs that don't have one allocated already - if ($image_type == IMAGETYPE_PNG) { + if ( $image_type == IMAGETYPE_PNG ) { // turn off transparency blending (temporarily) imagealphablending($dst_image_rs, false);