mirror of
https://github.com/octoleo/docker-joomla.git
synced 2024-10-31 18:52:28 +00:00
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:
parent
457aa21336
commit
ffbb7e3854
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
@ -15,6 +15,7 @@ else
|
|||||||
|
|
||||||
$maxTries = 10;
|
$maxTries = 10;
|
||||||
|
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
$mysql = new mysqli($host, $argv[2], $argv[3], '', (int) $port);
|
||||||
|
Loading…
Reference in New Issue
Block a user