Use `mysqli_report(MYSQLI_REPORT_OFF)` in `makedb.php`

Using PHP 8.1, the `makedb.php` script fails if the connection cannot be
established at the first try.  This is because according to
https://www.php.net/manual/en/mysqli-driver.report-mode.php, the default mysqli
reporting mode is now `MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT` while it was
`MYSQLI_REPORT_OFF` before.  The change makes `mysqli::__construct()` throw an
exception, which is not caught.  This commit restores the old behavior.
This commit is contained in:
Nils Husung 2022-10-19 12:21:45 +02:00
parent 457aa21336
commit ffbb7e3854
No known key found for this signature in database
GPG Key ID: 894A9F2F50BA6828
13 changed files with 13 additions and 0 deletions

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);

View File

@ -15,6 +15,7 @@ else
$maxTries = 10;
mysqli_report(MYSQLI_REPORT_OFF);
do
{
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);