xref: /PHP-8.3/ext/pdo_oci/tests/bug_33707.phpt (revision 39131219)
1--TEST--
2PDO OCI Bug #33707 (Errors in select statements not reported)
3--EXTENSIONS--
4pdo
5pdo_oci
6--SKIPIF--
7<?php
8require __DIR__.'/../../pdo/tests/pdo_test.inc';
9PDOTest::skip();
10?>
11--FILE--
12<?php
13require 'ext/pdo/tests/pdo_test.inc';
14$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
15$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
16
17$rs = $db->query('select blah from a_table_that_does_not_exist');
18var_dump($rs);
19var_dump($db->errorInfo());
20?>
21--EXPECTF--
22bool(false)
23array(3) {
24  [0]=>
25  string(5) "HY000"
26  [1]=>
27  int(942)
28  [2]=>
29  string(%d) "OCIStmtExecute: ORA-00942: table or view does not exist
30 (%s:%d)"
31}
32