Skip to content

Throw ValueError instead of TypeError for malformed GMP number #6572

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

Closed
wants to merge 1 commit into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Jan 4, 2021

As discussed in #6545, passing an invalid string to GMP should throw a ValueError rather than a TypeError.

cc @Girgias @cmb69

@@ -55,7 +56,6 @@ $functions2 = [
'gmp_or',
'gmp_xor',
'gmp_hamdist',
'gmp_nextprime',
];
Copy link
Member Author

Choose a reason for hiding this comment

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

Incorrectly classified functions were previously hidden because ArgumentCountError is a TypeError.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

Thanks for taking care of this!

@php-pulls php-pulls closed this in 65f14b0 Jan 4, 2021
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.

3 participants