-
Notifications
You must be signed in to change notification settings - Fork 363
Coerce empty string to null #381
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,7 +128,7 @@ public function getValidCoerceTests() | |
| "boolean":"true", | ||
| "object":{}, | ||
| "array":[], | ||
| "null":null, | ||
| "null":"", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I notice that you have lots of explicit tests in
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand. Can you provide an example? I believe I originally created this file by duplicating BasicTypesTest.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohhh, I think I get what you mean. One sec...
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a post-validate test for null. I also removed what looked like a duplicated block of explicit tests in the same section of code. Not sure if there was any purpose for it... |
||
| "any": "string", | ||
| "allOf": "1", | ||
| "multitype1": "false", | ||
|
|
||
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.
Need a newline above
return is_null($value);to make the style checker happy.