diff options
author | Ondřej Surý <ondrej@sury.org> | 2010-03-09 11:57:54 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2010-03-09 11:57:54 +0100 |
commit | 855a09f4eded707941180c9d90acd17c25e29447 (patch) | |
tree | a40947efaa9876f31b6ee3956c3f3775768143bb /ext/pdo_pgsql/tests/bug_33876.phpt | |
parent | c852c28a88fccf6e34a2cb091fdfa72bce2b59c7 (diff) | |
download | php-855a09f4eded707941180c9d90acd17c25e29447.tar.gz |
Imported Upstream version 5.3.2upstream/5.3.2
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)); +} |