xref: /PHP-8.2/ext/pdo_pgsql/tests/bug36727.phpt (revision 39131219)
1--TEST--
2Bug #36727 (segfault in bindValue() when no parameters are defined)
3--EXTENSIONS--
4pdo
5pdo_pgsql
6--SKIPIF--
7<?php
8require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
9require __DIR__ . '/config.inc';
10PDOTest::skip();
11?>
12--FILE--
13<?php
14require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
15require __DIR__ . '/config.inc';
16$db = PDOTest::test_factory(__DIR__ . '/common.phpt');
17
18$stmt = $db->prepare('SELECT * FROM child');
19var_dump($stmt->bindValue(':test', 1, PDO::PARAM_INT));
20
21echo "Done\n";
22?>
23--EXPECTF--
24Warning: PDOStatement::bindValue(): SQLSTATE[HY093]: Invalid parameter number: :test in %s on line %d
25bool(false)
26Done
27