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

dev/core#393 Allow 0 as a valid option value when option group data_type is Integer #12817

Merged
merged 2 commits into from
Sep 14, 2018

Conversation

MegaphoneJon
Copy link
Contributor

…ata_type is Integer

Overview

The check for invalid option values gives a false positive when the option group's data_type is Integer and the value is 0. This is particularly noticeable when you have the "Related Permissions" extension version 1.5 installed.

Before

A notice appears in the System Status screen.

After

No notice appears.

Technical Details

This is a truthiness issue.

Comments

Steps to replicate manually are on the Gitlab issue but a phpunit test is included which you can run with/without the functional change.

@eileenmcnaughton
Copy link
Contributor

Thanks @MegaphoneJon this looks good. Thanks for the test too.

In general I believe we should err-on-merge for any changes that make system checks looser as they are not supposed to interfere on correct sites & that is probably more important than their existance

@eileenmcnaughton eileenmcnaughton merged commit 3c0e6cf into civicrm:master Sep 14, 2018
@mlutfy mlutfy changed the title Closes core#393 - allow 0 as a valid option value when option group d… dev/core#393 Allow 0 as a valid option value when option group data_type is Integer Oct 25, 2018
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.

2 participants