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

Update parseParam to accept columnType argument #4807

Merged
merged 5 commits into from Aug 23, 2019

Conversation

@nfourtythree
Copy link
Contributor

commented Aug 23, 2019

This PR fixes an issue with datetime fields SQL queries when using :empty: and :notempty: in MySQL v8 onwards.

The error is caused as the parseParam method creates a query the uses a blank string e.g. '' and the datetime column type does not accept it as a valid input.

This was raised in commerce issue craftcms/commerce#870

Currently, it only checks against datetime but could (and probably should) be extended to check against numeric fields as well.

@brandonkelly brandonkelly merged commit e450131 into 3.3 Aug 23, 2019
@brandonkelly brandonkelly deleted the feature/param-column-type branch Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.