diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 8bbb035..97fb835 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -619,13 +619,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::configFactory()->getEditable('color.theme.' . $theme) @@ -646,7 +646,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.