diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 138385c..00802f1 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -635,13 +635,13 @@ function _color_render_images($theme, &$info, &$paths, $palette) { imagedestroy($source); // Cut out slices. - foreach ($info['slices'] as $file => $coord) { - list($x, $y, $width, $height) = $coord; - $base = drupal_basename($file); + foreach ($info['slices'] as $slice_info) { + list($x, $y, $width, $height) = $slice_info['coord']; + $base = drupal_basename($slice_info['file']); $image = drupal_realpath($paths['target'] . $base); // Cut out slice. - if ($file == 'screenshot.png') { + if ($slice_info['file'] == 'screenshot.png') { $slice = imagecreatetruecolor(150, 90); imagecopyresampled($slice, $target, 0, 0, $x, $y, 150, 90, $width, $height); \Drupal::config('color.theme.' . $theme) @@ -662,7 +662,7 @@ function _color_render_images($theme, &$info, &$paths, $palette) { drupal_chmod($image); // Build before/after map of image paths. - $paths['map'][$file] = $base; + $paths['map'][$slice_info['file']] = $base; } // Clean up target buffer.