Skip to content

fix: throw Postgre query errors with warnings disabled (#6913) - #10573

Open
wakqasahmed wants to merge 2 commits into
codeigniter4:developfrom
wakqasahmed:feature/issue-6913-postgre-exception
Open

wakqasahmed wants to merge 2 commits into
codeigniter4:developfrom
wakqasahmed:feature/issue-6913-postgre-exception

Conversation

@wakqasahmed

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • New test fails on develop and passes with the fix against a disposable Postgre test database.
  • BadQueryTest.php (3 tests, 4 assertions).
  • Focused Postgre transaction start and exception tests (2 tests, 4 assertions).
  • PHP syntax checks and git diff --check.
  • Full CI on PR.

@wakqasahmed wakqasahmed changed the title Fix Postgre query errors when warnings are disabled (#6913) fix: throw Postgre query errors with warnings disabled (#6913) Sep 19, 2026
@carson-codeigniter4 carson-codeigniter4 Bot added the bug Verified issues on the current code behavior or pull requests that will fix them label Sep 19, 2026

@wakqasahmed wakqasahmed left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant