mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
ENHANCEMENT Expose errors as they are available with sqlsrv driver in MSSQLDatabaseConfigurationHelper
This commit is contained in:
parent
9c4f25b43f
commit
036570e3c1
@ -75,13 +75,20 @@ class MSSQLDatabaseConfigurationHelper implements DatabaseConfigurationHelper {
|
|||||||
'UID' => $databaseConfig['username'],
|
'UID' => $databaseConfig['username'],
|
||||||
'PWD' => $databaseConfig['password']
|
'PWD' => $databaseConfig['password']
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$errors = sqlsrv_errors();
|
||||||
|
if($errors) {
|
||||||
|
$error .= "\n";
|
||||||
|
foreach($errors as $detail) {
|
||||||
|
$error .= "\n" . @$detail['message'] . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($conn) {
|
if($conn) {
|
||||||
$success = true;
|
$success = true;
|
||||||
} else {
|
} else {
|
||||||
$success = false;
|
$success = false;
|
||||||
$error = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
Loading…
Reference in New Issue
Block a user