-
Notifications
You must be signed in to change notification settings - Fork 754
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 for #5291: Non-Integer Thumbnail Sizes Break API Calls #5292
Conversation
This is a behavior change for sure, I think we need to hold/merge this with a 10.0.0 release. But option to discussion |
@mitchelsellers it looks to me like this is a bugfix, previously it would return a 500 and now it returns a sensible dimension. My only concern is performance, but this method should not be hammered much and it has client cache enabled by default. Unless I am missing something... |
@valadas I could see that, but we are going from "it must be an integer or it will error" to "it could be any type of number and we guess, or fall back" |
@mitchelsellers I was initially against such code change (quoting internal ticket discussion):
but then got a guidance from my top management which I had to follow:
|
Yeah, I agree that I would prefer for the calling code to send an integer there. |
@v-karbovnichy this branch now has conflicts, and the maintainers haven't been given access to make changes to the branch, so we can't merge this PR. Please merge these changes with |
@bdukes I had resolved the conflict, please proceed. |
…dnnsoftware#5292) * DNN-61848 - Core Engineering Maintenance * Update DefaultDimension to be 10 px Co-authored-by: Ricardo Tejo <ricardo.tejo@trilogy.com>
Fixes #5291
Summary
Implements a function ParseDimension to allow non-integer values for width and height, return a rounded value when decimals are used, and a DefaultDimension value when it is not a number.
Unit tests added.