Bug #74462 [Opn->Csd]: PDO_Firebird returns only NULLs for results with boolean for FIREBIRD >= 3.0

From: Date: Tue, 03 Jul 2018 18:05:02 +0000
Subject: Bug #74462 [Opn->Csd]: PDO_Firebird returns only NULLs for results with boolean for FIREBIRD >= 3.0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216110@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74462&edit=1 ID: 74462 Updated by: ab@php.net Reported by: edgardmessias at gmail dot com Summary: PDO_Firebird returns only NULLs for results with boolean for FIREBIRD >= 3.0 -Status: Open +Status: Closed Type: Bug Package: PDO Firebird Operating System: All PHP Version: 7.0.18 -Assigned To: +Assigned To: ab Block user comment: N Private report: N New Comment: The linked PR was merged in 7.3. Thanks. Previous Comments: ------------------------------------------------------------------------ [2017-07-21 20:24:46] alex at zoosmart dot us Related To: Bug #74946 ------------------------------------------------------------------------ [2017-05-13 14:41:40] dorin dot marcoci at gmail dot com Here is the fix: https://github.com/php/php-src/pull/2522 Testers are welcome! ------------------------------------------------------------------------ [2017-04-17 19:14:10] edgardmessias at gmail dot com Description: ------------ From the version of FIREBIRD 3.0.0, Boolean type support was introduced (https://www.firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-ddl-enhance.html#rnfb30-ddl-boolean) Currently, the PDO returns only null values for Boolean columns Test script: --------------- CREATE TABLE TBOOL (ID INT, BVAL BOOLEAN); COMMIT; INSERT INTO TBOOL VALUES (1, TRUE); INSERT INTO TBOOL VALUES (2, 2 = 4); INSERT INTO TBOOL VALUES (3, NULL = 1); COMMIT; <php $pdo = new \PDO('firebird:dbname=localhost:/tmp/TEST.FDB', 'SYSDBA', 'masterkey', array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_CASE => PDO::CASE_LOWER, )); $stmt = $pdo->prepare("SELECT * FROM TBOOL"); $stmt->execute(); $rows = $stmt->fetchAll(); var_dump($rows); Expected result: ---------------- ID BVAL ============ ======= 1 <true> 2 <false> 3 <null> Actual result: -------------- ID BVAL ============ ======= 1 <null> 2 <null> 3 <null> ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74462&edit=1

« previous php.bugs (#216110) next »