Fix sqlsrv test script
parent
316febbb28
commit
69e11af307
|
@ -29,11 +29,14 @@ sqlsrv_connect(
|
||||||
'PWD' => 'password',
|
'PWD' => 'password',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
$rc = 0;
|
||||||
$errors = sqlsrv_errors(SQLSRV_ERR_ALL);
|
$errors = sqlsrv_errors(SQLSRV_ERR_ALL);
|
||||||
if (is_array($errors)) {
|
if (is_array($errors)) {
|
||||||
foreach ($errors as $error) {
|
foreach ($errors as $error) {
|
||||||
if (isset($error['message']) && stripos($error['message'], 'This extension requires the Microsoft ODBC Driver for SQL Server') !== false) {
|
if (isset($error['message']) && stripos($error['message'], 'This extension requires the Microsoft ODBC Driver for SQL Server') !== false) {
|
||||||
fwrite(STDERR, trim($error['message']) . "\n");
|
fwrite(STDERR, trim($error['message']) . "\n");
|
||||||
|
$rc = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
exit($rc);
|
||||||
|
|
Loading…
Reference in New Issue