mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #9430] Comparison when using false value has an error #11613
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/9430
State: closed
Merged: No
We had a project where we had the following:
When called and setting $value to true, everything worked. When setting it to false, we get an exception from the DB because the statement ends up being
w.duplicate = WHERE...I traced this to the __toString on the Comparision.php class.This test causes that to be detected and fail. No fix offered as I wasn't sure what way that should be fixed, but I don't mind also including the fix if anyone here has suggestions on how to implement it.
I should point out that we 'fixed' this in our code by doing
(int)$valuewhen passing it to the->set('w.duplicate', $value)call.