bug81343.phpt 635 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #81343 pdo_pgsql: Inconsitent boolean conversion after calling closeCursor()
  3. --EXTENSIONS--
  4. pdo
  5. pdo_pgsql
  6. --SKIPIF--
  7. <?php
  8. require __DIR__ . '/config.inc';
  9. require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
  10. PDOTest::skip();
  11. ?>
  12. --FILE--
  13. <?php
  14. require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
  15. $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt');
  16. $pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
  17. $sth = $pdo->prepare("select false where 2=?");
  18. for ($i = 0; $i < 2; $i++) {
  19. $sth->execute([2]);
  20. var_dump($sth->fetchColumn(0));
  21. $sth->closeCursor();
  22. }
  23. ?>
  24. --EXPECT--
  25. bool(false)
  26. bool(false)