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

Helpers: Fix dumpSql() for bool parameters #251

Merged
merged 1 commit into from Feb 4, 2020
Merged

Helpers: Fix dumpSql() for bool parameters #251

merged 1 commit into from Feb 4, 2020

Conversation

RiKap
Copy link
Contributor

@RiKap RiKap commented Feb 4, 2020

  • bug fix
  • BC break? no

This is just UI bug fix.
I found that Helpers::dumpSql() has problem with bool parameters.
Bool parameters are processed in last step and casted to (string).
Problem is that (string) FALSE is empty string and not 0.
Because of that is dumpSql() able to generate invalid sql like this:

WHERE (`user`.`deleted` = OR `user`.`deleted` IS NULL)

instead of valid:

WHERE (`user`.`deleted` = 0 OR `user`.`deleted` IS NULL)

@dg
Copy link
Member

@dg dg commented Feb 4, 2020

Thanks

@dg dg merged commit 784a573 into nette:master Feb 4, 2020
2 checks passed
@RiKap RiKap deleted the patch-1 branch Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants