bug_74462.phpt 700 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. PDO_Firebird: Bug #74462 Returns only NULLs for boolean fields
  3. --EXTENSIONS--
  4. pdo_firebird
  5. --SKIPIF--
  6. <?php require('skipif.inc'); ?>
  7. --ENV--
  8. LSAN_OPTIONS=detect_leaks=0
  9. --FILE--
  10. <?php
  11. require 'testdb.inc';
  12. $dbh->exec('recreate table atable (id integer not null, abool boolean)');
  13. $dbh->exec('insert into atable (id, abool) values (1, true)');
  14. $dbh->exec('insert into atable (id, abool) values (2, false)');
  15. $dbh->exec('insert into atable (id, abool) values (3, null)');
  16. $S = $dbh->query('select abool from atable order by id');
  17. $D = $S->fetchAll(PDO::FETCH_COLUMN);
  18. unset($S);
  19. unset($dbh);
  20. var_dump($D);
  21. ?>
  22. --EXPECT--
  23. array(3) {
  24. [0]=>
  25. bool(true)
  26. [1]=>
  27. bool(false)
  28. [2]=>
  29. NULL
  30. }