Skip to content
Snippets Groups Projects

Issue #3327442 by mably: handle case where ImageStyle has been overriden by other modules

3 files
+ 13
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -149,8 +149,10 @@ class ImageAPIOptimizePipeline extends ConfigEntityBase implements ImageAPIOptim
$style_storage = $this->entityTypeManager()->getStorage('image_style');
foreach ($style_storage->loadMultiple() as $style) {
/** @var ImageStyleWithPipeline $style */
if ($style->hasPipeline() && $style->getPipelineEntity()->id() == $this->id()) {
$style->flush();
if ($style instanceof ImageStyleWithPipeline) {
if ($style->hasPipeline() && $style->getPipelineEntity()->id() == $this->id()) {
$style->flush();
}
}
}
Loading