Merge pull request #481 from lilgreenbird/php72_testfixes

test fixes for PHP 7.2
This commit is contained in:
v-susanh 2017-07-25 10:04:31 -07:00 committed by GitHub
commit 259f13c45c
4 changed files with 9 additions and 9 deletions

View file

@ -35,8 +35,8 @@ function ConnectionTest()
// Valid connection attempt => no errors are expected
Trace("\nValid connection attempt (to $server) ....\n");
$conn2 = Connect();
$errors = sqlsrv_errors(SQLSRV_ERR_ERRORS);
if(count($errors) != 0)
$errors = sqlsrv_errors(SQLSRV_ERR_ERRORS);
if (!empty($errors))
{
die("No errors were expected on valid connection attempts.");
}

File diff suppressed because one or more lines are too long

View file

@ -72,7 +72,7 @@ function FetchField($stmt, $idx, $numFields, $errorExpected)
function PrintError($errorExpected = true)
{
$errors = sqlsrv_errors(SQLSRV_ERR_ALL);
if (count($errors) > 0)
if (!empty($errors))
{
$e = $errors[0];
var_dump($e['message']);

View file

@ -52,7 +52,7 @@ sqlsrv_close($conn);
?>
--EXPECTREGEX--
Notice\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 26
(Warning|Notice)\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' (\(this will throw an Error in a future version of PHP\) )?in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 26
Array
\(
\[0\] => Array
@ -67,7 +67,7 @@ Array
\)
Notice\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 33
(Warning|Notice)\: Use of undefined constant SQLSRV_ENC_UNKNOWN - assumed \'SQLSRV_ENC_UNKNOWN\' (\(this will throw an Error in a future version of PHP\) )?in .+(\/|\\)sqlsrv_input_param_unknown_encoding\.php on line 33
Array
\(
\[0\] => Array
@ -81,4 +81,3 @@ Array
\)
\)