diff options
| author | Matteo Beccati <mbeccati@php.net> | 2014-11-06 15:46:49 +0100 |
|---|---|---|
| committer | Matteo Beccati <mbeccati@php.net> | 2014-11-06 15:47:32 +0100 |
| commit | 8fdc4d8797e176f9bb8d9f9509a45346478d9cc1 (patch) | |
| tree | 72f631599bec7f8708c3f474aad02c5e0fc8e921 /ext/pdo_pgsql/tests | |
| parent | 53266476e63608e4ce03c6d584864755806b28fe (diff) | |
| download | php-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.phpt | 15 |
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 |
