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

Add support for boolean fields which may have a 0 value #6

Open
wants to merge 1 commit into
base: 7.x-1.x
Choose a base branch
from

Conversation

juampynr
Copy link

_createapi__helper__filter__property() has the following logic to add a filter condition:

 $param_value = (isset($query_params[$param])) ? $query_params[$param] : FALSE;

if ($param_value) {
   $param_value_split = explode(',', $param_value);

If the field you are filtering to is a checkbox whose possible values are 0 or 1 and if you filter by value = 0, the above if statement ill fail and your filter won't be added. We should strictly check that the value is FALSE.

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.

1 participant