mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Human readable database inconsistent error (#12950)
* Human readable database inconsistent error In case a db error causes an exception, check validate and show the db errors to the user in the webui. * only failed validations * fix style
This commit is contained in:
@@ -79,11 +79,10 @@ class DatabaseController extends InstallationController implements InstallerStep
|
||||
(new Database())->validateSystem($validator);
|
||||
$results = $validator->getResults('database');
|
||||
|
||||
/** @var \LibreNMS\ValidationResult $result */
|
||||
foreach ($results as $result) {
|
||||
if ($result->getStatus() == ValidationResult::FAILURE) {
|
||||
$ok = false;
|
||||
$messages[] = $result->getMessage();
|
||||
$messages[] = $result->getMessage() . ' ' . $result->getFix();
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
Reference in New Issue
Block a user