error update

This commit is contained in:
2021-04-06 12:24:45 +02:00
parent 4ac00af622
commit 3f02668047
2 changed files with 4 additions and 4 deletions
+3 -4
View File
@@ -85,13 +85,12 @@ if(isset($_POST["dbSetup"])){
file_put_contents($conFilePath, json_encode($dbCon));
require_once('../bootstrap.php');
try{
$capsule->Connection()->getPdo();
require_once('../bootstrap.php');
} catch (\Exception $e) {
http_response_code(400);
file_put_contents($conFilePath, NULL);
echo json_encode(["message" => "Could not connect to the database. Please check your configuration. error:"]);
http_response_code(400);
echo json_encode(["message" => "Could not connect to the database. Please check your configuration. error:" . $e]);
exit();
}
require_once ('Database/databaseMigration.php');