-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Improve some ValueError messages #5340
Conversation
@@ -917,12 +917,12 @@ PHP_FUNCTION(imagecreatetruecolor) | |||
} | |||
|
|||
if (x_size <= 0 || x_size >= INT_MAX) { | |||
zend_value_error("Invalid width (x_size)"); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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.
@@ -917,12 +917,12 @@ PHP_FUNCTION(imagecreatetruecolor) | |||
} | |||
|
|||
if (x_size <= 0 || x_size >= INT_MAX) { | |||
zend_value_error("Invalid width (x_size)"); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree :D
No description provided.