fix: throw Postgre query errors with warnings disabled (#6913) - #10573
wakqasahmed wants to merge 2 commits into
Conversation
wakqasahmed
left a comment
There was a problem hiding this comment.
Reviewed 6d7297a against #6913. No actionable issues found.
The new failure path honors DBDebug, and BaseConnection::query() preserves default transaction exception suppression and transException(true) rollback behavior. The server error is captured before rollback can overwrite it. The regression restores error_reporting() in finally and uses the existing test database setup. The change is compatible with PHP 8.2.
Remaining validation: I did not rerun runtime tests during this review. The new regression covers warnings-disabled DBDebug=true outside transactions; warnings-disabled DBDebug=false and transaction cases have no additional regression tests. CI for this revision is still pending.
|
Hi @wakqasahmed , Thanks for your PR. Few reminders on your PRs:
|
Description
Throws
DatabaseExceptionwhen Postgre'spg_query()returnsfalsewithDBDebugenabled, even if PHP warnings are disabled — previously the failure was silently swallowed in that combination. Adds a Postgre regression test for the suppressed-warning query failure. Partially addresses #6913; OCI8 remains open, this PR does not close the issue.Checklist:
Test plan
developand passes with the fix against a disposable Postgre test database.BadQueryTest.php(3 tests, 4 assertions).git diff --check.