Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Return null early if there is no file to convert #669

Merged

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jan 5, 2025

Resolves the specific problem of not returning null when there is no file to convert with the solution described in #656 (comment)
Note that this is the same solution found in ImageManupulation::manipulate() which other manipulations such as Fill() use.

This scenario occurs when trying to convert a file from a has_one relation, where there is no record stored in that has_one, since an empty record is returned instead of null from the magic has one method.

Actually changing the logging for other failure scenarios will be handled in silverstripe/silverstripe-framework#11511 in 5.4

Issue

@emteknetnz emteknetnz merged commit 627d272 into silverstripe:2.3 Jan 6, 2025
10 checks passed
@emteknetnz emteknetnz deleted the pulls/2.3/convert-null branch January 6, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image::Convert() shows error in frontend instead of returning null
2 participants