Closed amaneshi closed 5 years ago
Thanks for this. A pull request that has been carefully tested to ensure no side-effects would be most welcome.
OK, I'll create pull. About testing - I tested it on my case and theoretically it shouldn't broke anything. If you have another cases to test - point me.
In project I have such condition block in find options:
According to logic I want to get:
but got (in first where clause I got OR in place of AND):
After investigating plugin code I found a bug. In MvcDatabaseAdapter class on line 115 we have:
As in my case first sub-clause of OR clause have KEY = 0 PHP evaluates
$key == 'OR'
to 'true' but should be 'false'. To fix this bug we should use triple equality sign===
to overcome this issue. Please fix this bug!