xref: /PHP-8.2/ext/pdo_pgsql/tests/bug_64705.phpt (revision ac18dd0d)
1--TEST--
2Bug #64705 errorInfo property of PDOException is null when PDO::__construct() fails
3--EXTENSIONS--
4pdo_pgsql
5--FILE--
6<?php
7$dsn = 'pgsql:host=DonotExistsHost;dbname=test;user=foo;password=wrongpass';
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