summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/tests
diff options
context:
space:
mode:
authorMatteo Beccati <mbeccati@php.net>2014-11-06 15:46:49 +0100
committerMatteo Beccati <mbeccati@php.net>2014-11-06 15:47:32 +0100
commit8fdc4d8797e176f9bb8d9f9509a45346478d9cc1 (patch)
tree72f631599bec7f8708c3f474aad02c5e0fc8e921 /ext/pdo_pgsql/tests
parent53266476e63608e4ce03c6d584864755806b28fe (diff)
downloadphp-git-8fdc4d8797e176f9bb8d9f9509a45346478d9cc1.tar.gz
Fixed bug #68351 (PDO::PARAM_BOOL and ATTR_EMULATE_PREPARES misbehaving)
Diffstat (limited to 'ext/pdo_pgsql/tests')
-rw-r--r--ext/pdo_pgsql/tests/bug62593.phpt15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/tests/bug62593.phpt b/ext/pdo_pgsql/tests/bug62593.phpt
index e3ebf46ed5..4ab4566f00 100644
--- a/ext/pdo_pgsql/tests/bug62593.phpt
+++ b/ext/pdo_pgsql/tests/bug62593.phpt
@@ -34,6 +34,19 @@ $query->execute();
$errors[] = $query->errorInfo();
var_dump($value);
+// Try with strings - Bug #68351
+$value = '0';
+$query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($query->fetchColumn());
+
+$value = "abc";
+$query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($query->fetchColumn());
+
$expect = 'No errors found';
foreach ($errors as $error)
@@ -48,4 +61,6 @@ echo $expect;
--EXPECTF--
bool(true)
bool(false)
+bool(true)
+bool(false)
No errors found