diff options
Diffstat (limited to 'ext/pdo_pgsql/tests/bug_33876.phpt')
-rw-r--r-- | ext/pdo_pgsql/tests/bug_33876.phpt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/pdo_pgsql/tests/bug_33876.phpt b/ext/pdo_pgsql/tests/bug_33876.phpt index 0ec04e8bd..48618e13d 100644 --- a/ext/pdo_pgsql/tests/bug_33876.phpt +++ b/ext/pdo_pgsql/tests/bug_33876.phpt @@ -80,10 +80,14 @@ else # Expected to fail; unless told otherwise, PDO assumes string inputs # false -> "" as string, which pgsql doesn't like -if (!$res->execute(array(false))) - print_r($res->errorInfo()); -else +if (!$res->execute(array(false))) { + $err = $res->errorInfo(); + // Strip additional lines ouputted by recent PgSQL versions + $err[2] = trim(current(explode("\n", $err[2]))); + print_r($err); +} else { print_r($res->fetchAll(PDO::FETCH_ASSOC)); +} |