php-sqlsrv/test/functional/sqlsrv/test_conn_execute.phpt
Jenny Tam b6d815bfc9
Changes made to source and tests to support PHP 7.3 (#822)
* Changes made to support php 7.3

* Correct use of the smart pointer

* Fixed the tests for 7.3

* Some clean up for array_init()

* Fixed formattings and clean up
2018-07-26 15:21:03 -07:00

25 lines
713 B
PHP

--TEST--
crash caused by a statement being orphaned when an error occurred during sqlsrv_conn_execute.
--SKIPIF--
<?php require('skipif.inc'); ?>
--FILE--
<?php
sqlsrv_configure( 'WarningsReturnAsErrors', 0 );
sqlsrv_configure( 'LogSeverity', SQLSRV_LOG_SEVERITY_ALL );
require( 'MsCommon.inc' );
$conn1 = Connect();
$stmt1 = sqlsrv_query($conn1, "SELECT * FROM Servers");
sqlsrv_close($conn1);
$row1 = sqlsrv_fetch_array($stmt1);
$conn3 = Connect();
echo "Test successful\n";
?>
--EXPECTREGEX--
Warning: sqlsrv_fetch_array\(\) expects parameter 1 to be resource, bool(ean){0,1} given in .+(\/|\\)test_conn_execute\.php on line 11
Test successful