Troubleshooting errors displaying
parent
d32e270598
commit
a272d50174
|
@ -31,10 +31,7 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') {
|
||||||
$pdo = $db->getConnection();
|
$pdo = $db->getConnection();
|
||||||
return ['db' => $db, 'error' => null];
|
return ['db' => $db, 'error' => null];
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$error = getError('Error connecting to DB.', $e->getMessage());
|
return ['db' => null, 'error' => getError('Error connecting to DB.', $e->getMessage())];
|
||||||
return $error;
|
|
||||||
// include '../app/templates/block-message.php';
|
|
||||||
// exit();
|
|
||||||
}
|
}
|
||||||
// mysql/mariadb database
|
// mysql/mariadb database
|
||||||
} elseif ($config['db']['db_type'] === 'mysql' || $config['db']['db_type'] === 'mariadb') {
|
} elseif ($config['db']['db_type'] === 'mysql' || $config['db']['db_type'] === 'mariadb') {
|
||||||
|
@ -50,10 +47,7 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') {
|
||||||
$pdo = $db->getConnection();
|
$pdo = $db->getConnection();
|
||||||
return ['db' => $db, 'error' => null];
|
return ['db' => $db, 'error' => null];
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$error = getError('Error connecting to DB.', $e->getMessage());
|
return ['db' => null, 'error' => getError('Error connecting to DB.', $e->getMessage())];
|
||||||
return $error;
|
|
||||||
// include '../app/templates/block-message.php';
|
|
||||||
// exit();
|
|
||||||
}
|
}
|
||||||
// unknown database
|
// unknown database
|
||||||
} else {
|
} else {
|
||||||
|
@ -64,6 +58,5 @@ function connectDB($config, $database = '', $dbFile = '', $platformId = '') {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// return $db;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue