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

Improve some ValueError messages #5340

Closed

Conversation

kocsismate
Copy link
Member

No description provided.

@@ -917,12 +917,12 @@ PHP_FUNCTION(imagecreatetruecolor)
}

if (x_size <= 0 || x_size >= INT_MAX) {
zend_value_error("Invalid width (x_size)");
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if showing the exact interval would be better

Copy link
Member

Choose a reason for hiding this comment

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

Saying greater than 0 should be fine IMHO

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.

Maybe add , VALUE given ? not sure how helpful that might be but it can be a hint.

ext/bz2/bz2.c Outdated Show resolved Hide resolved
@@ -917,12 +917,12 @@ PHP_FUNCTION(imagecreatetruecolor)
}

if (x_size <= 0 || x_size >= INT_MAX) {
zend_value_error("Invalid width (x_size)");
Copy link
Member

Choose a reason for hiding this comment

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

Saying greater than 0 should be fine IMHO

@@ -10,4 +10,4 @@ try {
}
?>
--EXPECT--
Unknown value 1000
assert_options(): Argument #1 ($what) must have a valid value
Copy link
Member

Choose a reason for hiding this comment

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

That's an interesting argument name

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree :D

ext/bz2/bz2.c Outdated Show resolved Hide resolved
ext/calendar/tests/cal_from_jd_error1.phpt Outdated Show resolved Hide resolved
@php-pulls php-pulls closed this in 5076507 Apr 6, 2020
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.

None yet

3 participants