Skip to content
Snippets Groups Projects
Commit 3fc8e2cf authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #6130 from aternatik/bug-6129

FIX #6129 : correct test on database connection
parents 0f2963d0 d5128a18
No related branches found
No related tags found
No related merge requests found
...@@ -249,7 +249,7 @@ if (! $error) { ...@@ -249,7 +249,7 @@ if (! $error) {
if (! $db->connected) print $langs->trans("IfDatabaseNotExistsGoBackAndUncheckCreate").'<br><br>'; if (! $db->connected) print $langs->trans("IfDatabaseNotExistsGoBackAndUncheckCreate").'<br><br>';
print $langs->trans("ErrorGoBackAndCorrectParameters"); print $langs->trans("ErrorGoBackAndCorrectParameters");
$error++; $error++;
} elseif ($db->error && (empty($db_create_database) && $db->connected)) { } elseif ($db->error && ! (! empty($db_create_database) && $db->connected)) {
// Note: you may experience error here with message "No such file or directory" when mysql was installed for the first time but not yet launched. // Note: you may experience error here with message "No such file or directory" when mysql was installed for the first time but not yet launched.
if ($db->error == "No such file or directory") print '<div class="error">'.$langs->trans("ErrorToConnectToMysqlCheckInstance").'</div>'; if ($db->error == "No such file or directory") print '<div class="error">'.$langs->trans("ErrorToConnectToMysqlCheckInstance").'</div>';
else print '<div class="error">'.$db->error.'</div>'; else print '<div class="error">'.$db->error.'</div>';
...@@ -991,4 +991,3 @@ function write_conf_file($conffile) ...@@ -991,4 +991,3 @@ function write_conf_file($conffile)
return $error; return $error;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment