Skip to content

Commit 858b38e

Browse files
committed
fix PDO test check on false.
1 parent d17bd4a commit 858b38e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ext/pdo_pgsql/tests/bug_33876.phpt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ if (!$res->execute(array(true)))
4444
else
4545
print_r($res->fetchAll(PDO::FETCH_ASSOC));
4646

47-
# Expected to fail; unless told otherwise, PDO assumes string inputs
48-
# false -> "" as string, which pgsql doesn't like
47+
# Expected to succeeds; PDO will cast to "0".
4948
if (!$res->execute(array(false)))
5049
print_r(normalizeErrorInfo($res->errorInfo()));
5150
else
@@ -122,9 +121,11 @@ Array
122121
)
123122
Array
124123
(
125-
[0] => 22P02
126-
[1] => 7
127-
[2] => %s: %sboolean%s
124+
[0] => Array
125+
(
126+
[foo] => false
127+
)
128+
128129
)
129130
EMUL
130131
Array

0 commit comments

Comments
 (0)