1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/pdo_pgsql/tests/bug_64705.phpt
2021-06-29 17:13:02 +02:00

16 lines
371 B
PHP

--TEST--
Bug #64705 errorInfo property of PDOException is null when PDO::__construct() fails
--EXTENSIONS--
pdo_pgsql
--FILE--
<?php
$dsn = 'pgsql:host=DonotExistsHost;dbname=test;user=foo;password=wrongpass';
try {
$pdo = new \PDO($dsn, null, null);
} catch (\PDOException $e) {
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
}
?>
--EXPECT--
bool(true)