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

getRadioCheckedState - use is_null instead of ! #650

Open
szwagros opened this issue May 18, 2020 · 2 comments
Open

getRadioCheckedState - use is_null instead of ! #650

szwagros opened this issue May 18, 2020 · 2 comments
Labels

Comments

@szwagros
Copy link

When checking if request has specified variable:

if ($this->missingOldAndModel($name) && !$request)

using negation operator gives wrong results if request has variable but it's value is for example 0 - which I believe is very common with radio input.

Changing it to:

if ($this->missingOldAndModel($name) && is_null($request))

solves this issue.

@rogermui
Copy link

Looks like it was missed when checkbox was fixed in #453.

@mlantz mlantz added the bug label May 19, 2020
mvaraujo pushed a commit to mvaraujo/html that referenced this issue Dec 4, 2020
@mvaraujo mvaraujo mentioned this issue Dec 4, 2020
@mvaraujo
Copy link
Contributor

mvaraujo commented Dec 4, 2020

Looks like it was missed when checkbox was fixed in #453.

I fixed #453 three years ago, for check-boxes, and did not have the time to test the radio-buttons. Well, here we are :-)

I just submitted a pull request.

Thanks for the ticket and have good coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants