xref: /PHP-8.2/ext/pdo_sqlite/tests/bug_64705.phpt (revision ac18dd0d)
1--TEST--
2Bug #64705 errorInfo property of PDOException is null when PDO::__construct() fails
3--EXTENSIONS--
4pdo_sqlite
5--FILE--
6<?php
7$dsn = 'sqlite:./bug64705NonExistingDir/bug64705NonExistingDb';
8try {
9  $pdo = new \PDO($dsn, null, null);
10} catch (\PDOException $e) {
11  var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
12}
13?>
14--EXPECT--
15bool(true)
16