mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 06:05:53 +00:00
ENHANCEMENT Added additional error message pass through on the configuration helper for SQL Server
This commit is contained in:
parent
a37fd93c37
commit
9c4f25b43f
@ -36,13 +36,21 @@ class MSSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelper {
|
||||
'UID' => $databaseConfig['username'],
|
||||
'PWD' => $databaseConfig['password']
|
||||
));
|
||||
|
||||
$errors = sqlsrv_errors();
|
||||
if($errors) {
|
||||
$error .= "\n";
|
||||
foreach($errors as $detail) {
|
||||
$error .= "\n" . @$detail['message'] . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($conn) {
|
||||
$success = true;
|
||||
} else {
|
||||
$success = false;
|
||||
$error = 'SQL Server requires a valid username and password to determine if the server exists.';
|
||||
if(!$error) $error = 'SQL Server requires a valid username and password to determine if the server exists.';
|
||||
}
|
||||
|
||||
return array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user