removed redundant count() as per review comment
This commit is contained in:
parent
3e8b44546f
commit
e3fd38c873
|
@ -36,7 +36,7 @@ function ConnectionTest()
|
|||
Trace("\nValid connection attempt (to $server) ....\n");
|
||||
$conn2 = Connect();
|
||||
$errors = sqlsrv_errors(SQLSRV_ERR_ERRORS);
|
||||
if (!empty($errors) && count($errors) != 0)
|
||||
if (!empty($errors))
|
||||
{
|
||||
die("No errors were expected on valid connection attempts.");
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ using an already closed connection.
|
|||
$conn2 = Connect();
|
||||
$stmt1 = sqlsrv_query($conn2, "IF OBJECT_ID('PHPTable', 'U') IS NOT NULL DROP TABLE [PHPTable]");
|
||||
$errors = sqlsrv_errors();
|
||||
if (!empty($errors) && count($errors) != 0)
|
||||
if (!empty($errors))
|
||||
{
|
||||
die("No errors were expected on valid connection attempts.");
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ function FetchField($stmt, $idx, $numFields, $errorExpected)
|
|||
function PrintError($errorExpected = true)
|
||||
{
|
||||
$errors = sqlsrv_errors(SQLSRV_ERR_ALL);
|
||||
if (!empty($errors) && count($errors) > 0)
|
||||
if (!empty($errors))
|
||||
{
|
||||
$e = $errors[0];
|
||||
var_dump($e['message']);
|
||||
|
|
Loading…
Reference in a new issue