diff options
Diffstat (limited to 'ext/oci8/tests/imp_res_get_close_1.phpt')
-rw-r--r-- | ext/oci8/tests/imp_res_get_close_1.phpt | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/ext/oci8/tests/imp_res_get_close_1.phpt b/ext/oci8/tests/imp_res_get_close_1.phpt index 0aef8577c2..14ab04aa00 100644 --- a/ext/oci8/tests/imp_res_get_close_1.phpt +++ b/ext/oci8/tests/imp_res_get_close_1.phpt @@ -40,26 +40,23 @@ echo "Test 1\n"; $s = oci_parse($c, $plsql); oci_execute($s); -while (($s1 = oci_get_implicit_resultset($s))) { - while (($row = oci_fetch_array($s1, OCI_ASSOC+OCI_RETURN_NULLS)) != false) { - foreach ($row as $item) { - echo " ".$item; +try { + while (($s1 = oci_get_implicit_resultset($s))) { + while (($row = oci_fetch_array($s1, OCI_ASSOC+OCI_RETURN_NULLS)) != false) { + foreach ($row as $item) { + echo " ".$item; + } + echo "\n"; + oci_free_statement($s1); // Free the implicit result handle } - echo "\n"; - oci_free_statement($s1); // Free the implicit result handle } + oci_free_statement($s); +} catch(\TypeError $exception) { + var_dump($exception->getMessage()); } -oci_free_statement($s); ?> --EXPECTF-- Test 1 1 - -Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d - 3 - -Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d - 5 - -Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d +string(%d) "oci_fetch_array(): supplied resource is not a valid oci8 statement resource"
\ No newline at end of file |