bug71573.phpt 632 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Bug #71573 (Segfault (core dumped) if paramno beyond bound)
  3. --EXTENSIONS--
  4. pdo
  5. pdo_pgsql
  6. --SKIPIF--
  7. <?php
  8. require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
  9. require_once __DIR__ . '/config.inc';
  10. PDOTest::skip();
  11. ?>
  12. --FILE--
  13. <?php
  14. require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
  15. require_once __DIR__ . '/config.inc';
  16. $db = PDOTest::test_factory(__DIR__ . '/common.phpt');
  17. $statement = $db->prepare('select ?');
  18. $statement->execute([ 'test', 'test', 'test' ]);
  19. ?>
  20. --EXPECTF--
  21. Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in %s on line %d