diff --git a/core/modules/image/image.post_update.php b/core/modules/image/image.post_update.php index 33f99242ce..cde93fc2e9 100644 --- a/core/modules/image/image.post_update.php +++ b/core/modules/image/image.post_update.php @@ -27,17 +27,13 @@ function image_post_update_image_style_dependencies() { */ function image_post_update_scale_and_crop_effect_add_anchor(&$sandbox = NULL) { \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'image_style', function ($image_style) { - $updated = FALSE; /** @var \Drupal\image\ImageStyleInterface $image_style */ $effects = $image_style->getEffects(); foreach ($effects as $effect) { if ($effect->getPluginId() === 'image_scale_and_crop') { - $image_style->save(); - $updated = TRUE; - break; + return TRUE; } } - - return $updated; + return FALSE; }); }