Skip to content

Declare proper parameter default values for imagegd2 #10569

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

Merged
merged 2 commits into from
Feb 23, 2023

Conversation

kocsismate
Copy link
Member

I don't see any problem with removing the UNKNOWN default values from imagegd2... So I'm not sure why we didn't do this before 🤔

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.

The only thing that might need checking (which is already an existing issue) is that the value stored in zend_long does fit in int.

But otherwise this looks sensible to me.

@kocsismate
Copy link
Member Author

The only thing that might need checking (which is already an existing issue) is that the value stored in zend_long does fit in int.

Yeah, I also noticed this problem, but as far as I can understand, explicitly checking for overflow would fix the issue, wouldn't it?

@Girgias
Copy link
Member

Girgias commented Feb 18, 2023

The only thing that might need checking (which is already an existing issue) is that the value stored in zend_long does fit in int.

Yeah, I also noticed this problem, but as far as I can understand, explicitly checking for overflow would fix the issue, wouldn't it?

Yeah, and emitting an E_WARNING for now is what I did for the posix functions.

@kocsismate
Copy link
Member Author

Yeah, and emitting an E_WARNING for now is what I did for the posix functions.

Sounds like a good idea! :) I'll do it too!

@kocsismate kocsismate merged commit 1011782 into php:master Feb 23, 2023
@kocsismate kocsismate deleted the imagegd2-nullable branch February 23, 2023 09:54
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