Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Fix initialization with PHP 8.1 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cmb69
Copy link

@cmb69 cmb69 commented Jun 11, 2021

As of PHP 8.1.0, the default mysqli error mode has been changed to
exception mode[1]. That causes $conn->select_db(DB_NAME) to fail
with an uncaught exception, preventing the database to be properly
initialized.

This pull request fixes this in the least intrusive way, namely by
manually setting the error mode back to silent.

[1] https://wiki.php.net/rfc/mysqli_default_errmode


Other than this, I have not detected other issues with PHP 8.1 so far.

As of PHP 8.1.0, the default mysqli error mode has been changed to
exception mode[1].  That causes `$conn->select_db(DB_NAME)` to fail
with an uncaught exception, preventing the database to be properly
initialized.

This pull request fixes this in the least intrusive way, namely by
manually setting the error mode back to silent.

[1] <https://wiki.php.net/rfc/mysqli_default_errmode>
cmb69 added a commit to php/php-sdk-binary-tools that referenced this pull request Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant