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