|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2021-08-10 13:03 UTC] phofstetter at sensational dot ch
[2021-08-10 13:32 UTC] phofstetter at sensational dot ch
[2021-08-10 13:34 UTC] phofstetter at sensational dot ch
[2021-08-11 16:24 UTC] git@php.net
[2021-08-11 16:24 UTC] git@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ After calling closeCursor() on a Postgres PDO statement handle, the conversion behavior for boolean values will change: prior to calling closeCursor, boolean values in the database get converted to PHP boolean values. after calling closeCursor() (and subsequently calling execute() again), boolean values will be converted to strings 't' and 'f' This was fine in PHP 8.0, broken in PHP 8.1b2 at least, though I'll update this bug with after some bisecting to find the specific commit. Test script: --------------- $pdo = new PDO('pgsql:host=localhost;port=5432;user=someuser;dbname=somedb'); $sth = $pdo->prepare("select false where 2=?"); for ($i = 0; $i < 2; $i++) { $sth->execute([2]); var_dump($sth->fetchColumn(0)); $sth->closeCursor(); } Expected result: ---------------- bool(false) bool(false) Actual result: -------------- bool(false) string(1) "f"