mirror of
https://github.com/itflow-org/itflow
synced 2026-03-02 11:54:52 +00:00
Tidy try catch
This commit is contained in:
@@ -785,8 +785,7 @@ if(isset($_POST['add_database'])){
|
|||||||
// Test database connection before writing it to config.php
|
// Test database connection before writing it to config.php
|
||||||
try {
|
try {
|
||||||
mysqli_connect($host, $username, $password, $database);
|
mysqli_connect($host, $username, $password, $database);
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch (Exception $e) {
|
|
||||||
exit("<b>Database connection failed - please check and try again</b> <br> <br> $e");
|
exit("<b>Database connection failed - please check and try again</b> <br> <br> $e");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user