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

ext/gd: imageaffinematrixget() strengthening options type check. #18208

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

devnexen
Copy link
Member

to be also more in line with other imageaffine* calls.

to be also more in line with other imageaffine* calls.
@devnexen devnexen marked this pull request as draft March 31, 2025 20:20
@devnexen devnexen marked this pull request as ready for review March 31, 2025 21:14
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have a separate PR which adds more tests with different types in the array so that any change to the behaviour can be clearly seen.

ext/gd/gd.c Outdated
Comment on lines 4145 to 4147
case IS_STRING:
x = zval_get_double(tmp);
break;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this return 0 for garbage strings like "string" ? Obviously an improvement over the current situation, but still not amazing. Also this probably will fail for GMP objects which might be supported rn?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants