Skip to content
Snippets Groups Projects
Commit d5128a18 authored by Jean-François Ferry's avatar Jean-François Ferry
Browse files

FIX #6129 : correct test on database connection

parent 2dda1d7c
No related branches found
No related tags found
No related merge requests found
......@@ -249,7 +249,7 @@ if (! $error) {
if (! $db->connected) print $langs->trans("IfDatabaseNotExistsGoBackAndUncheckCreate").'<br><br>';
print $langs->trans("ErrorGoBackAndCorrectParameters");
$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.
if ($db->error == "No such file or directory") print '<div class="error">'.$langs->trans("ErrorToConnectToMysqlCheckInstance").'</div>';
else print '<div class="error">'.$db->error.'</div>';
......@@ -991,4 +991,3 @@ function write_conf_file($conffile)
return $error;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment