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