1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-29 12:43:15 +01:00

Merge pull request #6184 from rxu/ticket/16749

[ticket/16749] Explicitly set default MySQLi error mode
This commit is contained in:
Marc Alexander 2021-04-05 21:39:49 +02:00
commit 2c66f69c51
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -71,6 +71,13 @@ class mysqli extends \phpbb\db\driver\mysql_base
// Disable loading local files on client side
@mysqli_options($this->db_connect_id, MYSQLI_OPT_LOCAL_INFILE, false);
/*
* As of PHP 8.1 MySQLi default error mode is set to MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT
* See https://wiki.php.net/rfc/mysqli_default_errmode
* Since phpBB implements own SQL errors handling, explicitly set it back to MYSQLI_REPORT_OFF
*/
mysqli_report(MYSQLI_REPORT_OFF);
@mysqli_query($this->db_connect_id, "SET NAMES 'utf8'");
// enforce strict mode on databases that support it