fix: prepared query is executed when using QueryBuilder#6164
fix: prepared query is executed when using QueryBuilder#6164kenjis merged 4 commits intocodeigniter4:developfrom
Conversation
MGatner
left a comment
There was a problem hiding this comment.
I'm not very familiar with query pretending but the code logic looks good. Was this bug actually "hiding" because of the PHPStan exemption? Or was that just a coincidence?
|
The changes seem fine but I guess I'm not understanding how this stops the prepared query from being executed with a query builder call. |
|
@lonnieezell See the current But the line to return when $pretend is true is here.CodeIgniter4/system/Database/BaseConnection.php Lines 664 to 669 in e8f2080 I have moved this before the I believe this PR behaves the same as before in Prepared Queries without the bug, |
Probably no. If we remove the the PHPStan exemption, we get the errors. It is true that the if conditions of the lines with errors are not necessary, but probably we don't notice this bug. |
Description
How to confirm the bug
The MySQL query log of testExecuteRunsQueryAndReturnsResultObject():
Checklist: