summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/tests/bug_33876.phpt
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2010-03-09 11:57:54 +0100
committerOndřej Surý <ondrej@sury.org>2010-03-09 11:57:54 +0100
commit855a09f4eded707941180c9d90acd17c25e29447 (patch)
treea40947efaa9876f31b6ee3956c3f3775768143bb /ext/pdo_pgsql/tests/bug_33876.phpt
parentc852c28a88fccf6e34a2cb091fdfa72bce2b59c7 (diff)
downloadphp-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.phpt10
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));
+}