From 85956d68cc873ab7ce0f27dbebcf885229b6a30b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Fri, 11 Jun 2021 20:22:52 +0200 Subject: [PATCH] Fix initialization with PHP 8.1 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] --- init.php | 1 + 1 file changed, 1 insertion(+) diff --git a/init.php b/init.php index 93ee0c5..05ce4b0 100644 --- a/init.php +++ b/init.php @@ -149,6 +149,7 @@ function initDB() { $conn->close(); } +mysqli_report(MYSQLI_REPORT_OFF); initDB(); printExistingDB(); ?>