xref: /PHP-8.3/ext/oci8/tests/pecl_bug6109.phpt (revision a53e5617)
1--TEST--
2PECL Bug #6109 (Error messages not kept)
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8?>
9--FILE--
10<?php
11
12require __DIR__.'/connect.inc';
13
14// Run Test
15
16echo "Test 1\n";
17
18$s = oci_parse($c, 'delete from table_does_not_exist');
19$r = @oci_execute($s);
20
21if ($r) {
22    echo "whoops - table does exist\n";
23} else {
24    for ($i = 0; $i < 5; $i++) {
25        $err = oci_error($s);
26        echo ($i) .' -> '.$err['message'] ."\n";
27    }
28}
29
30// Cleanup
31
32oci_close($c);
33
34echo "Done\n";
35
36?>
37--EXPECTF--
38Test 1
390 -> ORA-00942: %s
401 -> ORA-00942: %s
412 -> ORA-00942: %s
423 -> ORA-00942: %s
434 -> ORA-00942: %s
44Done
45