Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.1: MySQLi: Default error mode set to exceptions #4870

Closed
mondrake opened this issue Oct 13, 2021 · 3 comments · Fixed by #4880
Closed

PHP 8.1: MySQLi: Default error mode set to exceptions #4870

mondrake opened this issue Oct 13, 2021 · 3 comments · Fixed by #4880

Comments

@mondrake
Copy link
Contributor

mondrake commented Oct 13, 2021

Bug Report

Q A
BC Break no
Version 3.1

Summary

In PHP 8.1, MySQLi default error mode is set to exceptions. Prior to PHP 8.1, the default error reporting mode in MySQLi was to silent the errors.

If I understand correctly, now mysqli_sql_exception is not captured and standardized into DBAL exceptions, and rather bubble up in consuming code.

https://php.watch/versions/8.1/mysqli-error-mode

@morozov
Copy link
Member

morozov commented Oct 15, 2021

In #4685, the mysqli driver sets the error mode to MYSQLI_REPORT_OFF. A patch that implements handling of the new default is welcome.

@derrabus
Copy link
Member

derrabus commented Oct 15, 2021

I'm trying to fix this in #4875.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants