Jira issue originally created by user @lsmith77:
I do not see this behavior when running findByOne() calls via the Apache SAPI. No clue really what could possibly cause this. Not sure how to get the error logger to output something in a phpunit test (never really figured out how phpunit supports debugging). Essentially if I run the tests with SQLite the case with 'false' fails and when I run with PostgreSQL the case with 0 fails. Essentially in the fail case I get an instance of $this, just like when I pass: false.
Tell me if this report is useless in the current state and then I will work on separating it out into a standalone CLI script without Symfony2 and phpunit. But I dont want to spend more time on this if it isnt necessary.
Comment created by @beberlei:
Attached simpler testcase for reproduce.
Comment created by @lsmith77:
further testing shows this issue only exists with false and there I can reproduce it on the CLI and via apache. it seems I am hitting: http://bugs.php.net/bug.php?id=33876
however the issue also happens with sqlite for the same reason false gets casted to an empty string when not telling PDO explicitly to handle the parameter as a boolean.
as explained in the previous comment, the issue is caused by "false" and not by "true" as in the test case.
This issue occured, because BasicEntityPersister did not pass the PARAM: typehints to the DBAL connection.
Adding this fixes the issue with Booleans on PostgreSQL, however I just realized it also exists for Oracle OCI and needs an adjustment in DBAL to be fixable.
Issue was closed with resolution "Fixed"
I am also seeing the issue with SQLite.
ok .. i can confirm the issue is fixed on sqlite and postgresql
Imported 2 attachments from Jira into https://gist.github.com/8e1cc73065be95be26a6