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

Ensure that the value 'off' is properly read as a false boolean. #119

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

wpscholar
Copy link

Currently, if a site has the default status of 'off' (disabled), the status in the sites list view shows 'enabled' as the status. This is due to checking if the non-empty string whose value is set to 'off' is falsey, which of course it is not. By running the string through filter_var() and using the FILTER_VALIDATE_BOOLEAN flag, we are able to ensure that strings are properly converted into booleans if the values are 'on' or 'off'.

@GaryJones GaryJones changed the base branch from master to develop February 11, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants