No crop found in getCropFromImageStyleId if the last effect has no cropping

Created on 6 August 2021, over 3 years ago
Updated 4 September 2024, 3 months ago

Problem/Motivation

In Crop::getCropFromImageStyleId the fallback uses foreach to check for existing crops on effects.
Even if one is found, it still loops over the rest so if your last image style effect doesn't have a crop, no crop will be found.

Break out foreach when crop is found.

Steps to reproduce

  • Add at least two image style effects where one contains a crop and the others don't.
  • Set the last effect as one without a crop.

Proposed resolution

Break out foreach when crop is found.

Remaining tasks

Discuss / document.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇧🇪Belgium stefdewa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024